How Mathematics Works

Variables, Constants and Parameters, Three Roles a Letter Can Play

Tell apart the letters that vary, the ones that stay fixed and the settings that pick one case from a family, with worked examples.

Key takeaways

  • A variable ranges over a set of values, while a constant such as π never changes.
  • A parameter is fixed for each individual case and varies across a whole family of cases.
  • Roles are assigned by the question, so the same symbol can switch roles when the question changes.
  • Index and integration letters are placeholders that can be renamed without changing the value of an expression.

A variable is a letter for a quantity allowed to take different values within the problem you are studying. A constant has one fixed value throughout. A parameter is held fixed while you study one case, but can be changed to move to another case.

These are roles, and the letter alone does not settle which one it plays. The same g or a can be a constant in one line of reasoning and a variable in the next. What decides it is the question being asked.

One line, three roles

Consider the equation of a non-vertical straight line, y = mx + b.

  • x and y are variables. As a point slides along the line, they change together.
  • m and b are parameters. For any particular line they are fixed, with m the slope and b the height where the line crosses the vertical axis.
  • If you write a specific line such as y = 2x + 7, the numbers 2 and 7 are constants.

Think of m and b as two dials. Set the dials, and you get one line. With the dials frozen, let x run over all real numbers, and you trace that line. Turn a dial, and the whole line moves.

This two-level structure is the point of parameters. Instead of studying infinitely many lines one at a time, you study the formula once and learn how its behavior depends on the settings. The idea underlies the link coordinates made between algebra and geometry.

Constants of several kinds

Some constants are universal. The ratio of a circle's circumference to its diameter in Euclidean geometry is π, approximately 3.14159. The number e, approximately 2.71828, is the base of the natural logarithm. These symbols keep their meaning from problem to problem, although an author may occasionally reuse the letter for something else and should say so.

Plain numerals are constants too. In 5x + 2, both 5 and 2 are fixed.

Other letters are constant only locally. A problem may say "let r be the radius of the given circle". Within that problem r does not change, yet it has no universal value.

Calculus adds the arbitrary constant. Every function of the form x² + C has derivative 2x. Here C stands for any fixed number, and an extra condition selects one. If the function must equal 5 when x = 1, then 1 + C = 5, so C = 4.

Physics has measured constants, such as the speed of light in vacuum. Mathematically they behave like any fixed number, but their values come from experiment or from the definitions of units.

Variables and unknowns

The word variable covers a few situations that feel different.

In an equation such as 2x + 1 = 7, the letter x is often called an unknown. It does not wander about. It stands for the value or values that make the statement true, here only x = 3.

In a function such as f(x) = 2x + 1, x really does range over many values, and the output follows. It is the independent variable, and y = f(x) is the dependent variable.

In an identity such as x + y = y + x, the letters stand for any numbers at all. The line is a general law.

In each case you should know the domain: the set of values the letter may take. If n counts people, then n = 2.5 makes no sense. If x appears under a square root among real numbers, the expression beneath must not be negative. A function is not fully described until its domain is stated.

Three roles in h = h₀ + v₀t − ½gt²
Variables t, the time since launch h, the height at time t Change during a single throw Parameters h₀, the starting height v₀, the starting upward speed Fixed per throw, differ between throws Constants ½, a pure number g, treated as fixed near Earth's surface Same for every throw in this model Variables t, the time since launch h, the height at time t Change during a single throw Parameters h₀, the starting height v₀, the starting upward speed Fixed per throw, differ between throws Constants ½, a pure number g, treated as fixed near Earth's surface Same for every throw in this model

The roles shown are for the usual question: where is the ball at each moment?

A thrown ball, two questions

Ignoring air resistance, the height of a ball thrown straight up can be modeled by h(t) = h₀ + v₀t − ½gt², where g ≈ 9.8 meters per second squared near Earth's surface.

Question 1: where is the ball over time? Take h₀ = 2 meters and v₀ = 10 meters per second. Now t is the variable.

h(t) = 2 + 10t − 4.9t²
h(1) = 2 + 10 − 4.9 = 7.1 meters

Question 2: how hard must you throw to be 12 meters up after 2 seconds? Now the time is fixed and v₀ is the unknown.

12 = 2 + v₀ · 2 − 4.9 · 4
12 = 2v₀ − 17.6
2v₀ = 29.6
v₀ = 14.8 meters per second

The formula did not change. The roles did. And if you compared the same throw on the Moon, g would become a parameter that differs from world to world.

Families and thresholds

Parameters become most interesting when a small change in one alters the character of the answer. Look at x² + c = 0 over the real numbers.

Value of c Real solutions
c < 0 two, x = ±√(−c)
c = 0 one, x = 0
c > 0 none

The value c = 0 is a threshold. The general quadratic ax² + bx + c = 0, with a ≠ 0, works the same way. The quantity b² − 4ac, called the discriminant, decides whether there are two real roots (positive), one repeated root (zero) or none (negative). A single expression in the parameters classifies the whole family.

The condition a ≠ 0 matters. If a = 0 the equation is no longer quadratic, and the quadratic formula would divide by zero. Checking such special parameter values is a habit worth building, closely related to testing formulas on extreme cases.

In the study of changing systems, thresholds like this are called bifurcations: a gradual change in a parameter produces a sudden change in long-run behavior.

A family you can explore by hand

Take the parabolas y = (x − p)² + q. Here x and y are variables, while p and q are parameters. Every member of the family has the same shape. What differs is where its lowest point sits, namely at (p, q).

p q Lowest point y when x = 3
0 0 (0, 0) 9
1 0 (1, 0) 4
1 5 (1, 5) 9
3 −2 (3, −2) −2

Read down the last column and you are doing something new: holding x at 3 and letting the parameters change. For that moment, p and q are the variables.

To pin down one member, you need information. Suppose the lowest point has x-coordinate 2 and the curve passes through (4, 7). Then p = 2, and 7 = (4 − 2)² + q gives q = 3. The specific curve is y = (x − 2)² + 3. In general, each independent parameter needs about one piece of independent information to fix it, though some conditions allow more than one answer or none.

Fitting a model to data works on the same principle. The form of the formula is chosen first, and the measurements are then used to estimate the parameters.

Placeholders that disappear

Some letters exist only inside an expression. In the sum of k for k from 1 to 4, the value is 1 + 2 + 3 + 4 = 10. The letter k does not appear in the result. You could use j or m and get the same 10. Such a letter is called a bound variable or dummy variable.

The same holds for the variable of integration in a definite integral, and for the letter in "for all x, x² ≥ 0" over the real numbers. A letter that is not bound in this way is free, and the value of the expression depends on it.

In the sum of k from 1 to n, k is bound and n is free. The value n(n + 1)/2 depends on n only. Reusing one letter for both, as in "sum of n from 1 to n", is a reliable way to confuse yourself. See sigma and product notation for more.

Letter customs and their limits

A widespread habit, associated with René Descartes in the 1600s, uses letters near the end of the alphabet (x, y, z) for unknowns and letters near the start (a, b, c) for known quantities. Today n, k and m often stand for integers, t for time, and Greek letters often serve as angles or parameters.

Statistics adds its own meaning. There, a parameter is usually a feature of a whole population, such as its mean μ, which is fixed but often unknown. A statistic such as the sample mean is computed from data and varies from sample to sample.

None of these customs is binding. A good author states each role, and a good reader checks.

How to sort the letters in a new formula

When a formula looks like alphabet soup, work through these questions.

  1. What is being asked for? That quantity is your unknown or output.
  2. Which quantities change during the situation described? Those are variables.
  3. Which are fixed for this case but would differ in another? Those are parameters.
  4. Which never differ? Those are constants.
  5. What values is each allowed to take?

Try it on the area formula A = πr². If you are watching a ripple spread, r and A are variables and π is a constant. In a cylinder volume V = πr²h where you compare cans of different heights but one radius, r is a parameter and h is the variable. Differentiating with respect to r or h then gives different answers, which is why calculus always asks "with respect to what?"

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 32 articles in How Mathematics Works →

Latest news on this topic