I am doing a warm up and got stuck on a function question

x : 2 3 4
f(x): 2 1 0

Can someone help me figure out the function rule?

y decreases as x increases, so start with

y = -x
Since y(2) is 2, and not -2, add 4:
y = 4-x

I get it. So it's like 4-2= 2, 4-3= 3, and 4-4= 0 . I thought it was saying that y is y(x), that just stands for the name of the function. The function rule is something different. Thanks so much for your help, Steve.

Sure! To figure out the function rule, let's observe the pattern and relationship between the values of x and f(x).

Looking at the values of x and f(x), notice that as x increases by 1, f(x) decreases by 1. This suggests that there might be a linear relationship between x and f(x).

To find the function rule, we can use the slope-intercept form of a linear equation, which is y = mx + b. In this case, f(x) represents y, x represents x, m represents the slope, and b represents the y-intercept.

Let's calculate the slope (m) using the given points (2,2) and (3,1). The formula for slope is (y2 - y1) / (x2 - x1).

Using the points (2,2) and (3,1), the slope is (1 - 2) / (3 - 2) = -1.

Now that we have the slope (m), we can use one of the points, let's take (2,2), to find the y-intercept (b).

Using the point-slope form of a linear equation, which is y - y1 = m(x - x1), we can substitute the values of (2,2) and the slope (-1):

y - 2 = -1(x - 2)
y - 2 = -x + 2
y = -x + 4

Therefore, the function rule is f(x) = -x + 4.