What is the rule for the function shown in the table and show your work?

x -1 0 1 2
y -2 1 4 7

A. y = 1/3 x + 1

B. y = 3 x + 1

C. y = 1/3 x

D. y = 1/2 x + 1

To determine the rule for the function, we need to look at the relationship between the values of x and y in the table. We can see that as x increases by 1, y increases by 3. This tells us that the slope of the function is 3. We can also see that when x is 0, y is 1. This tells us that the y-intercept is 1.

Using this information, we can write the equation of the function in slope-intercept form:

y = mx + b

where m is the slope and b is the y-intercept. Plugging in the values we found, we get:

y = 3x + 1

Therefore, the rule for the function shown in the table is B. y = 3x + 1.