foundation17 min studyLesson 2 in Mathematics

Functions and graphs: describing dependence

Understand inputs, outputs, domains, and composition before treating a curve as a picture.

On this page

What you’ll understand

  • Identify the domain and output of a function.
  • Interpret slope and intercept in an affine model.
  • Compose two rules in the correct order and recognize domain restrictions.

A function lets you ask a repeatable question: if I supply this input, which output does the rule assign? A temperature conversion, a model prediction, and a particle's position at a specified time all fit this pattern. The function is the complete assignment, not merely its printed formula. Its allowed inputs matter just as much as the operations used to calculate the output.

One output for each allowed input

The notation f(x)f(x) means the value assigned by ff to input xx. It does not ordinarily mean multiplication of ff by xx. A function assigns exactly one output to every input in its domain. Different inputs may share an output: squaring sends both 22 and −2-2 to 44. This does not violate the function rule; it instead prevents an unrestricted inverse from assigning a unique original input.

A formula may impose restrictions even when no physical restrictions are present. For a real-valued square root, its argument must be nonnegative. Division requires a nonzero denominator. Applied models add further restrictions: a negative elapsed time might be mathematically accepted by a polynomial but outside the experiment. Always distinguish the formula's mathematical domain from the portion you intend to use.

f:[0,∞)→R,f(x)=xf:[0,\infty)\to\mathbb{R},\qquad f(x)=\sqrt{x}
This function accepts nonnegative real inputs and returns their nonnegative square roots. The declared codomain is real numbers; the outputs actually reached form the nonnegative range.↔ Scroll wide equations horizontally.

A graph is a set of input/output pairs

The graph of a real function contains the points (x,f(x))(x,f(x)) for allowed inputs. A horizontal coordinate names an input; the vertical coordinate records its output. A curve can be high while decreasing, or low while increasing. Height and change answer different questions. Keep axis labels and units visible, because the same shape can describe position, temperature, or an abstract score.

An affine rule has a constant output change per input change. Its intercept is the output at zero input, provided zero belongs to the domain. Its slope has output units divided by input units. People often call this a linear graph; in later linear algebra, “linear map” has the stricter requirement that zero goes to zero. Naming the distinction now prevents an avoidable surprise later.

y=mx+b,f(x+h)−f(x)h=m(h≠0)y=mx+b,\qquad \frac{f(x+h)-f(x)}{h}=m\quad(h\neq0)
For an affine function, m is the constant slope and b is the intercept. The difference quotient equals m for any nonzero step h whose endpoints are in the domain.↔ Scroll wide equations horizontally.

Build complicated rules from simple ones

Composition feeds the output of one function into another. In g(f(x))g(f(x)), evaluate ff first, then use its result as the input of gg. The intermediate output must belong to the next function's domain. This is the mathematical version of a data pipeline, and it will reappear in neural networks when a layer's output becomes the following layer's input. Order usually matters.

A graph is helpful evidence but not a complete definition when only a finite window is visible. A sharp turn may disappear at low resolution, and a pole may lie just outside the displayed range. Use the algebraic rule to answer exact questions and the picture to build intuition. When a prediction is physically implausible, check whether you extrapolated beyond the domain where the rule was fitted or justified.

A calibration followed by a conversion

A sensor produces a raw reading r. Calibration gives f(r) = 2r + 1 degrees Celsius, and a second rule converts Celsius to Fahrenheit: g(c) = 1.8c + 32. Find the final output at r = 4.

  1. Apply calibration first: f(4) = 2 × 4 + 1 = 9 degrees Celsius. This is an intermediate temperature, not a raw sensor reading.

  2. Feed that value into the conversion: g(9) = 1.8 × 9 + 32 = 48.2 degrees Fahrenheit.

  3. Check the order by writing the composite rule g(f(r)) = 1.8(2r + 1) + 32 = 3.6r + 33.8. Substituting r = 4 again gives 48.2.

The result

The composed output is 48.2 °F. Reversing these functions would not describe this calibration pipeline.

Explore the model

Interactive lab

Interactive lab · function

Separate height from change

The lab plots exactly y=ax2y=ax^2. Change coefficient a and position x, then compare the point's height with its displayed tangent slope. The animation illustrates this one quadratic family, not arbitrary functions or the affine calibration from the example.

Separate height from changeThis lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Current readings: y at chosen x: 0.608; Tangent slope · 2ax: 1.35; Signed area · ax³/3: 0.182. All parameters are adjustable with the labeled controls below.−2.4−1.201.22.4−9−4.504.59xy(x, ax²)
y = ax²TangentSigned integral
y at chosen x
0.608
Tangent slope · 2ax
1.35
Signed area · ax³/3
0.182
t = 0 s

This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forRead a point for a value, and compare neighboring points for a change.

Check your understanding

Which relationship is allowed for a function?

Try it yourself

Let f(x)=x+3f(x)=x+3 and g(x)=x2g(x)=x^2. Compute g(f(2))g(f(2)) and f(g(2))f(g(2)). Explain the difference.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Evaluate the inner parentheses first each time.

Compare with the solution

The first composition adds 3 to 2 and then squares, giving 25. The second squares 2 and then adds 3, giving 7. Each rule is valid on all real inputs, so the difference comes from operation order rather than a domain failure.

Take it with you

  • A function includes its domain and an unambiguous assignment of outputs.
  • Slope measures change; graph height measures value.
  • Composition follows the flow from the inner function to the outer function.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.