What Is a Function?
A function is a rule that takes an input and produces exactly one output. We write , read “y equals f of x”: feed the function a number , and it hands back a single number .
The set of every input a function is allowed to accept is its domain. The set of every output it can produce is its range. A function can be defined by only part of the number line — refuses negative inputs, and refuses zero, because neither has a well-defined real output there.
The one non-negotiable rule: each input maps to exactly one output. A relation that sends a single input to two different outputs (like “the square roots of x”, which gives both and for ) is not a function — that’s why we define to mean only the non-negative root.
Where you'll use this
Function Machine
Pick a function, drag the input, and watch the output — including where it becomes undefined.
Domain: all real numbers
f(2.0) = 4.000
This section’s quiz isn’t seeded yet — run `npm run db:seed`.