On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Algebra Fundamentals · Grade 9-12

Functional Dependency

Functional dependency is a relationship where each input value determines exactly one output value, so knowing x pins down y.

y=f(x): for each x, there is exactly one y

Quick Answer

Functional dependency is a relationship where each input value determines exactly one output value, so knowing x pins down y. You use it when one quantity is completely fixed by another: the area of a square by its side, the postage on a letter by its weight, a student's name by their ID number. The test is that no input ever gives two different outputs, though many inputs may share one output. Dependency is a mathematical claim about determination, not proof that the input physically causes the output.

Why This Matters

Calling something a function promises one answer per input, which is what lets you write y=f(x), graph it and use it to predict. If one input can give two outputs, as y2=x does at x=9, any formula built on it gives ambiguous results. And mistaking dependency for causation turns good data into bad decisions.

Intuitive Explanation

Picture a postage chart: letters up to 100 g cost $1.50, and heavier letters up to 250 g cost $2.80. Weigh any letter and the chart gives exactly one price, so price is a function of weight. Many weights share a price, which is allowed. What would break the dependency is one weight with two possible prices. Tables of pairs are tested the same way: in {(1,3),(2,5),(3,7),(2,9)} the input 2 appears with both 5 and 9, so y is not a function of x.

Direction matters. Price is a function of weight, but weight is not a function of price: a $2.80 letter could weigh 120 g or 240 g. Equations behave the same way. In x=y2, x is a function of y, because each y gives one x. But y is not a function of x: at x=9, both y=3 and y=−3 work. On a graph, a vertical line that crosses the curve twice shows an input with two outputs.

Dependency is not causation. A model such as "sales =12T−100 cones" makes sales a function of the temperature T, and the same equation rearranged makes temperature a function of sales. Both directions are valid functions, yet selling ice cream does not heat the weather. Whether one quantity causes another is a question about the world, answered by experiments, not by the form of an equation.

Think of it like this. A functional dependency is like a library catalogue: each call number points to exactly one spot on the shelves, so knowing the number tells you where to look. Many books can share a subject, but a call number leading to two places would make the catalogue useless. The catalogue says nothing about why a book sits where it does.

Core idea. Functional dependency means fixing the input forces a single determined output.


When to Use

Check for functional dependency when a problem asks whether y is a function of x, when one quantity is determined by or depends on another, or when a table, graph or equation must give one output per input. Look for any input repeated with different outputs, or a vertical line meeting a graph twice. If two quantities only tend to rise together, that is correlation; if the question is whether one produces the other, that is causation.

Tip. Ask: Does every allowed input produce exactly one output (never two)?

How to Recognize It

Look at how the pairs are given, as a table, a graph, an equation or a rule in words, and scan for repeated inputs.

  1. In the table or list, does any input appear twice?

    If it does with two different outputs, as in (3,5) and (3,8), the second quantity is not a function of the first; it is only a relation. A repeated input with the same output is fine.

  2. Can a vertical line cross the graph at more than one point?

    If so, some x has two y-values: the circle x2+y2=25 fails at x=3, where y=4 and y=−4. A graph that every vertical line crosses at most once passes.

  3. Do several different inputs share the same output?

    That is allowed: y=x2 gives 9 for both x=3 and x=−3 and is still a function. Only one input with two outputs breaks the rule, so do not reject a graph just because it repeats a height.

  4. Is the output fixed exactly by the input, or does it only tend to rise and fall with it?

    Exact determination, like postage from weight, is a functional dependency. Height and shoe size only tend to rise together, with scatter, which is correlation; whether one produces the other is a separate question of causation.

Functional Dependency compared with General relation, Correlation/association, and Causation

All four rows describe how two quantities go together, which is why they get confused. Ask how tight the link is: any pairing at all (relation), exactly one output per input (functional dependency), a trend with scatter (correlation), or one quantity actually producing the other (causation).

Functional Dependency

Meaning
Use this when one quantity is completely determined by another and you must confirm each input yields a single output.
Key test
Does every allowed input produce exactly one output (never two)?
Formula
y=f(x): for each x, there is exactly one y
Example
Does {(1,3),(2,5),(3,7),(2,9)} define y as a function of x?

General relation

Meaning
Any pairing of inputs and outputs, allowing one input to map to several outputs.
Key test
Use when pairs are listed with no single-output guarantee.
Example
{(1,2),(1,5)} — a relation, not a function

Correlation/association

Meaning
Two variables tend to move together statistically, with no exact determination.
Key test
Use when data merely trends together with scatter.
Example
Height and shoe size loosely track but do not determine each other

Causation

Meaning
One variable actually produces the change in another, a stronger claim than dependency.
Key test
Use when arguing a mechanism, not just a mapping.
Example
Pressing the gas causes speed to rise

Formula & Notation

y=f(x): for each x, there is exactly one y
Variable y functionally depends on x if ∃ f:D→R such that y=f(x), i.e., ∀x∈D,  ∃! y:y=f(x). The uniqueness condition distinguishes functions from general relations.

How to read it: Written as y=f(x), meaning 'y is a function of x.' The arrow notation x↦f(x) shows the mapping from input to output.

Worked Examples

Example 1 — Check the one-output rule

Easy

Does {(1,3),(2,5),(3,7),(2,9)} define y as a function of x?
Show the steps and the answer
  1. List the inputs: 1, 2, 3, 2.

    Repeated inputs are the only place where the one-output rule can fail.

  2. Check the repeated input: x=2 is paired with y=5 and with y=9.

    One input with two different outputs breaks the rule, because knowing x=2 does not fix y.

  3. Contrast with shared outputs: pairs like (1,3) and (4,3) together would be allowed.

    A function may send many inputs to one output; only one input with several outputs is forbidden.

Answer: No, y is not a function of x

Takeaway: Scan the inputs for repeats; a single repeated input with different outputs rules out a function.

Example 2 — Dependency vs causation

Standard

Ice cream sales rise with temperature. Does temperature determine sales as a function, and does it cause them?
Show the steps and the answer
  1. Write a model a shop might fit: S=12T−100 cones per day, where T is the temperature in °C.

    A formula like this assigns exactly one predicted sales figure to each temperature, so it is a function.

  2. Use it: at T=25, S=12(25)−100=200 cones; at T=30, S=260.

    Each input gives one output, which is all a functional dependency requires.

  3. Rearrange: T=S+10012, so the model also makes temperature a function of sales.

    The algebra runs in both directions, but selling ice cream cannot heat the day, so the equation alone cannot show which way causation goes.

  4. Note that two real days at 25 °C might sell 180 and 230 cones.

    The real data is only roughly a function of temperature; weekends, holidays and prices matter too, and only an experiment or more data can separate their effects.

Answer: It can be a functional model without proving causation

Takeaway: A functional model says one quantity predicts another; deciding whether it causes it needs evidence about the world, not just an equation.

Example 3 — Find the mistake: two outputs for one input

Application

Priya says y2=x defines y as a function of x "because for every x≥0 I can find a y." Find the mistake and give a version that is a function.
Show the steps and the answer
  1. Pick an input and find every output: at x=9, y2=9 gives y=3 or y=−3.

    Finding at least one output is not enough; a function needs exactly one.

  2. Check on the graph: the vertical line x=9 meets the curve at (9,3) and (9,−3).

    Two crossings by a vertical line mean two outputs for one input.

  3. Keep one branch: y=x, the non-negative root, gives only y=3 at x=9.

    Choosing a single output for every input turns the relation into a function.

  4. Note the reverse direction: x=y2 is a function of y.

    Each y gives one x, for example y=−3 gives x=9, so the dependency holds one way but not the other.

Answer: y2=x is not a function of x (x=9 gives y=±3); y=x is.

Takeaway: Test a relation by looking for an input with two outputs, not by checking that every input has at least one.

Where You'll See It

  • Student records in a school database

    Database designers list functional dependencies: a student ID determines a name, because each ID belongs to one student. A name does not determine an ID, since a school may have two students called Sam Lee. Storing each fact against a key like the ID keeps two records from disagreeing.

  • Barcodes at a supermarket till

    Each barcode maps to one price in the store's system, so price is a function of barcode, while many products can share a price. A barcode linked to two prices would leave the till unable to decide what to charge, which is exactly the error a price audit looks for.

Common Mistakes

  1. The slip: Allowing one input to give two outputs and still calling it a function

    Instead: apply the vertical line / one-output test.

  2. The slip: Confusing dependency with causation

    Instead: y=f(x) says x determines y mathematically, not that x physically causes y.

  3. The slip: Swapping which variable is the input

    Instead: the dependent (output) variable is the one being computed FROM the independent (input) one.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. If y=3x−2, find y when x=4. Could x=4 ever give a different y?

    Hint: Substitute, then think about what a rule does with one input.

  2. A table pairs x = 1, 2, 3, 4 with y = 5, 5, 8, 8. Is y a function of x? Is x a function of y?

    Hint: For each input, count the outputs. Then swap roles.

  3. Does x2+y2=25 define y as a function of x? Test x=3.

    Hint: Solve for y when x=3 and count the answers.

  4. A taxi charges $3 plus $2 per mile. Write the cost C as a function of miles m, find the cost of a 7-mile ride, and name the dependent variable.

    Hint: Which quantity is computed from the other?

  5. Among 50 students, taller students tend to have bigger shoe sizes, but two students of the same height can have different shoe sizes. Is shoe size a function of height, or a correlation?

    Hint: Does one height always give exactly one shoe size?

  6. For C=2.5n, the cost in dollars of n pencils, a student says "cost is the input and n is the output." Correct this and find the cost of 4 pencils.

    Hint: Which value do you choose, and which do you calculate?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

If y is a function of x, is x also a function of y?

Not necessarily. y=x2y=x^2 makes yy a function of xx, but going back, y=4y=4 comes from both x=2x=2 and x=−2x=-2, so xx is not a function of yy. The reverse works only when no two inputs share an output, as with y=2x+1y=2x+1, whose reverse is x=y−12x=\frac{y-1}{2}. That reverse is called the inverse function.

Can a function have no formula at all?

Yes. A function only needs a rule that assigns one output to each input, and the rule can be a table, a graph or a sentence. The function sending each day of 2025 to that day's highest temperature in your town has no formula, yet each day has exactly one maximum. Many functions in science and business are known only as data.

Why does a spreadsheet lookup need unique keys?

A lookup treats the key column as the input of a function: give it an ID and it returns one row. If two rows share an ID, the lookup either returns the first match or fails, because the key no longer determines a single output. Databases enforce unique keys for exactly this reason, so that every customer number points to one customer.

Can the output of a function be a whole set, like all the factors of n?

Yes, if the set is treated as one output. The rule that sends nn to its set of factors gives 12↦{1,2,3,4,6,12}12\mapsto\{1,2,3,4,6,12\}, exactly one set per number, so it is a function. What breaks the definition is listing those factors as six separate outputs of 12. Whether something is a function depends on what you count as a single output.

Learning Path

← Before

FunctionVariables
Functional Dependency

You are here

You need Function and Variables first. Functional dependency adds the precise test, every allowed input gives exactly one output in a stated direction, and the vertical line check for graphs. Next, Function Families group functions of the same form, such as all lines or all parabolas, and Causation asks the separate question of whether one quantity actually produces the other.

See Also