Constructing linear and exponential functions from graph | Algebra II | Khan Academy
The graphs of the linear function ( f(x) = mx + b ) and the exponential function ( g(x) = a \cdot r^x ) where ( r > 0 ) pass through the points ((-1, 9)) and ((1, 1)). So this very clearly is the linear function; it is a line right over here, and this right over here is the exponential function.
Given the fact that this exponential function keeps decreasing as ( x ) gets larger, it's a pretty good hint that our ( r ) right over here—they tell us that ( r > 0 )—but it's a pretty good hint that ( r ) is going to be between ( 0 ) and ( 1 ). The fact that ( g(x) ) keeps approaching ( 0 ) as ( x ) increases suggests that.
But let's use the data they're giving us, the two points of intersection, to figure out what the equations of these two functions are. So first, we can tackle the linear function.
Starting with ( f(x) = mx + b ), we can use the two points to figure out the slope. Our ( m ) right over here is our slope, which is the change in ( y ) over the change in ( x )—the rate of change of the vertical axis with respect to the horizontal axis.
Let's see, between those two points, what is our change in ( x )? If we are going from ( x = -1 ) to ( x = 1 ), we could think of it as finishing at ( 1 ) and starting at ( -1 ). So ( 1 - (-1) = 2 ).
Now, what about our change in ( y )? We start at ( 9 ) and we end up at ( 1 ). So ( 1 - 9 = -8 ). Just to be clear, when ( x = 1 ), ( y = 1 ), and when ( x = -1 ), ( y = 9 ).
We see that we took the differences: we get ( -8/2 ), which is equal to ( -4 ). Now we can write that ( f(x) = -4x + b ).
You can see that slope right over here; every time you increase your ( x ) by ( 1 ), you are decreasing your ( y ) by ( 4 ). So that makes sense that the slope is ( -4 ).
Now let's think about what ( b ) is. To figure out ( b ), we could use either one of these points. Let's try ( f(1) ) because ( 1 ) is a nice simple number.
We can write ( f(1) = -4 \cdot 1 + b ) and they tell us that ( f(1) = 1 ). So this part right over here gives us ( -4 + b = 1 ). Adding ( 4 ) to both sides, we find ( b = 5 ).
Thus, we have ( f(x) = -4x + 5 ). Now, does that make sense that the ( y )-intercept is ( 5 )? By inspection, we could have guessed that. But now we've solved it, confirming ( f(x) = -4x + 5 ).
Now let's figure out the exponential function. We can use the two points to determine the unknowns. For example, let's try the first point.
So ( g(-1) = a \cdot r^{-1} ) equals ( 9 ). We could write this as ( a/r = 9 ). Multiplying both sides by ( r ), we find ( a = 9r ).
Now, using the other point, ( g(1) = a \cdot r^1 = a \cdot r = 1 ). So how can we use this information ( a = 9r ) and ( a \cdot r = 1 ) to solve for ( a ) and ( r )?
We can take this ( a ) and substitute it into the other equation, replacing ( a ) with ( 9r ). This gives us ( 9r \cdot r = 1 ) or ( 9r^2 = 1 ).
Dividing both sides by ( 9 ) gives us ( r^2 = \frac{1}{9} ). To find ( r ), we take the positive square root since they tell us that ( r > 0 ). Thus, ( r = \frac{1}{3} ).
Now we can substitute this back into either of the equations to find ( a ). We know ( a = 9r ), so ( a = 9 \cdot \frac{1}{3} = 3 ).
So our exponential function can be written as ( g(x) = 3 \cdot \left(\frac{1}{3}\right)^x ).