🧮 Algebra

📉Functions & Their Graphs

Put a number in, the rule spits a number out — graph the machine and its temperament becomes a curve.

In variables and the function machine we met a mysterious machine: drop a number in, and it hands another number back according to a hidden rule. Time to give the machine its proper name — a function — and take one step further: plot its inputs and outputs on graph paper, and the machine's temperament appears as a curve.

A machine with input and output

A function is exactly such a machine:

  • Input (written xx): exactly one number goes in;
  • Rule: fixed forever, say "double it, then add 1";
  • Output: whatever the rule produces.

Once the rule is set, every input has exactly one output — one input may never produce two answers. That is the iron law of functions.

f(x): naming the rule

"Double it, then add 1" is written f(x)=2x+1f(x) = 2x + 1 — read "f of x", meaning: raw material xx, processed by rule ff. Asking for f(3)f(3) asks "what comes out if we feed in 3?" — f(3)=2×3+1=7f(3) = 2 \times 3 + 1 = 7. Likewise f(10)=21f(10) = 21 and f(0)=1f(0) = 1.

From table to graph

Make an input–output table for y=x2y = x^2:

xx−2−1012
yy41014

Plot each pair (x,y)(x, y) as a point, connect them with a smooth curve, and a U-shaped parabola appears. Different rules grow different shapes: rules like y=2x+1y = 2x + 1 draw straight lines, rules like y=x2y = x^2 bend into parabolas, and more complicated rules make curves that wave up and down.

Symmetry hiding in the table

1-1 and 11 both give 1; 2-2 and 22 both give 4 — squaring erases the minus sign. That is why the parabola is mirror-symmetric, and why it is not a line: the output runs faster than the input. Double the input, and the output quadruples.

Reading a graph

The graph is the machine's personality sheet:

  • Rising and falling: reading left to right, a climbing curve means "bigger input, bigger output"; a sinking one means the reverse;
  • Intercepts: where the curve crosses the yy-axis (the output when x=0x = 0), and where it lands on the xx-axis (the input whose output is exactly 0);
  • Domain and range, in one breath: the domain is every input the machine accepts, the range is every output it could possibly produce.
InteractiveFunction Grapher

y = x + 2

y-intercept

(0, 2)

x-intercept

(-2, 0)

Drag mm and bb: mm controls the slope, bb the starting point. The line y=2x+1y = 2x + 1 is what m=2m = 2, b=1b = 1 looks like, crossing the yy-axis exactly at 1. All further line tricks wait in straight line equations.

Check yourself

Quick quiz

  1. 1. If f(x)=2x+1, what is f(3)?

  2. 2. If y=x², what is y when x=−3?

  3. 3. Where does the line y=2x+1 cross the y-axis?