Category: Functions Level: 201
y = 2x ⇔ x = log2 y; graphs mirror across y = x
An inverse function undoes the original. Swap every input and output pair, and the graph flips across the line y = x.
Start with y = 2ˣ. Each step right doubles the height. List five points in the table.
y = 2x: (-1, 0.5), (0, 1), (1, 2), (2, 4), (3, 8)
The line y = x holds every point whose two coordinates match. It is the mirror for inverses.
mirror: y = x
Swap x and y in each pair: (2, 4) becomes (4, 2). The dashed links cross the mirror at right angles, and the mirror cuts each one in half.
(x, y) → (y, x): (2, 4) → (4, 2), (3, 8) → (8, 3)
The orange points lie on y = log₂ x, the inverse of 2ˣ. It answers the question: 2 to what power gives x?
log2 8 = 3 because 23 = 8
The swap trades the roles of the axes. 2ˣ takes any x and gives only positive outputs, so log₂ x takes only positive inputs and gives any output.
log2(2x) = x: the log undoes the power
cd svg-generator python3 -m svgmath render inverse-functions --out /tmp/inverse-functions
Source: svgmath/diagrams/function_operations.py