randRangeNonZero(-3, 3) randRangeNonZero(-5, 5) coefficient(M) + "x" coefficient(B) + "x" fractionVariable(1, M, "x") fractionVariable(-1, M, "x") M < 0 ? "-\\dfrac{" + (-M) + "}{x}" : "\\dfrac{" + M + "}{x}" fractionVariable(1, M, "y") fractionReduce(B, M) fractionReduce(M, B) function( x ) { return M * x + B; } function( x ) { return ( x - B ) / M; }

f(x) = M_X + B for all real numbers.

What is f^{-1}(x), the inverse of f(x)?

graphInit({ range: 10, scale: 20, tickStep: 1, labelStep: 2, axisArrows: "<->" }) // draw the function style({ stroke: BLUE, strokeWidth: 2 }, function() { plot( F, [ -10, 10 ] ); });

X_OVER_M - B_OVER_M

  • M_X - B
  • M_X + B
  • B_X + M
  • M_OVER_X + B
  • X_OVER_M + B
  • X_OVER_M - B
  • X_OVER_M - M_OVER_B
  • X_OVER_M + B_OVER_M
  • X_OVER_NEG_M - B_OVER_M
  • X_OVER_NEG_M + B_OVER_M

f(x) = M_X + B for all real numbers.

Write an expression for f^{-1}(x), the inverse of f(x).

graphInit({ range: 10, scale: 20, tickStep: 1, labelStep: 2, axisArrows: "<->" }) // draw the function style({ stroke: BLUE, strokeWidth: 2 }, function() { plot( F, [ -10, 10 ] ); });

f^{-1} = x / M - B / M

y = f(x), so solving for x in terms of y gives x=f^{-1}(y)

f(x) = y = M_X + B

y + -B = M_X

Y_OVER_M - B_OVER_M = x

x = Y_OVER_M - B_OVER_M

So we know: f^{-1}(y) = Y_OVER_M - B_OVER_M

var pos = function( n ) { if ( n >= 1 ) { return "below right"; } else if ( n > 0 ) { return "below"; } else if ( n > -1 ) { return "above"; } else { return "above right"; } }, fPos = pos( M ), fInvPos = pos( 1 / M ); // plot function inverse style({ stroke: RED, strokeWidth: 2 }, function() { plot( F_INV, [ -10, 10 ] ); }); if ( M !== -1 && ( M !== 1 || B !== 0 ) ) { // label f style({ color: BLUE, strokeWidth: 1 }, function() { label( labelPos( F ), "f(x)", fPos ); }); // label f_inv style({ color: RED, strokeWidth: 1 }, function() { label( labelPos( F_INV ), "f^{-1}(x)", fInvPos ); }); // Show line of symmetry style({ stroke: "#aaa", strokeWidth: 2, strokeDasharray: "- " }, function() { plot( function( x ) { return x; }, [ -10, 10 ] ); }); }

Rename y to x: f^{-1}(x) = X_OVER_M - B_OVER_M

Notice that f^{-1}(x) is just f(x) reflected across the line y = x.