Hello! Welcome to our next lesson.
In our previous sessions, we distinguished between evaluating an expression (a "forward" process of plugging in a number to get a result) and solving an equation (a "backward" process of finding the original number from a result). Today, we're going to formalize that "forward" process by introducing one of the most fundamental concepts in all of mathematics: the function.
Our goal is to understand a function as a reliable input-output relationship. This idea is the bedrock for describing processes and transformations, not just in linear algebra, but across science, engineering, and especially in AI, where models are essentially complex functions that turn input data into predictions.
The Function as a Machine
The most intuitive way to think about a function is as a machine. It takes something in (the input), performs a specific operation on it, and produces a result (the output).

Think of it like a vending machine. Your input is your money and a specific button press (e.g., C4). The machine (the function) processes this input and, if all goes well, gives you a single, predictable output: your chosen snack. You don't get two different snacks, and you don't get a random item each time. The relationship is consistent.

This "machine" concept is a powerful way to visualize how functions work. Let's explore it further.
Functions - KS3 Maths - BBC Bitesize
This article from BBC Bitesize does an excellent job of explaining the function machine concept with clear, simple examples.
Please read the following sections: Start with the Key points section to get the core definition. Next, read through Using function machines to see how numerical inputs are processed. Finally, read the section Using function machines to write expressions. This part is crucial as it connects the machine idea to the algebraic expressions we've been working with, showing what happens when the input is a variable like x instead of a number.
As you saw, a function is a rule that maps an input to an output. The collection of all possible inputs is called the domain, and the collection of all possible outputs is called the range.
The Golden Rule of Functions
The vending machine analogy highlights the single most important rule of functions: for each input, there must be exactly one output.
A machine that gives you a soda for input C4 is a function. A machine that might give you a soda or might give you chips for the same input C4 is not a function—it's just a broken machine.
This "one-to-one" or "many-to-one" relationship is what makes functions reliable and predictable. Many different inputs can lead to the same output (e.g., in the function , both inputs 2 and -2 lead to the output 4), but one single input cannot lead to multiple different outputs.
Let's watch a short video that makes this distinction crystal clear.
Algebra Basics What Are Functions? - Math Antics
This segment from a Math Antics video on functions provides an excellent explanation of the "one output per input" rule.
Please watch the clip from the important limitation. The video explains why an equation like y = 2x is a function, but an equation like y^2 = x is not, because one input x can lead to two possible outputs for y.
Visualizing Functions with Mapping Diagrams
Another way to visualize the input-output relationship is with a mapping diagram. This diagram uses two ovals—one for the inputs (domain) and one for the outputs (range)—and draws arrows to show how each input is mapped to its corresponding output.
Mapping Diagrams | Definition, Examples, Creating & Types
This article from Helping with Math will guide you through what mapping diagrams are and how they help distinguish a function from a general relationship (called a "relation").
Please focus on these parts: Read the Introduction and definition to understand what a mapping diagram shows. Now, jump to the section "Relation and Function". This is the most important part. Pay close attention to the definitions of a "relation" and a "function," and study the diagrams for one-to-one and many-to-one relations (which are functions) versus one-to-many (which are not). Finally, look at the first set of examples under "More Examples". For each of the four diagrams (a, b, c, and d), read the solution to see why it is or is not a function. This will test your understanding of the core rule.
The mapping diagrams make it visually obvious: if you see any single input in the domain with more than one arrow coming out of it, the relationship is not a function.
From Concepts to Equations: Function Notation
In algebra, we usually define the "rule" of a function with an equation. You've already done this without knowing it! When you evaluated the expression , you were using a function. The input is , and the output is the value of .
We can write this as an equation: . Here, is the input variable and is the output variable.
To make it even more explicit that we're dealing with a function, mathematicians use a special notation: .
You can read as "f of x". It looks like multiplication, but it is not. It's just a way of naming the function and its input:
- is the name of the function (our "machine"). We could also call it or or anything else.
- () indicates that is the input variable.
The notation is simply a more formal way of writing . They mean the same thing. The notation is just a convenient shorthand. For example, if we want to find the output when the input is 4, we can write "find ". This means "substitute 4 for in the function rule".
.
Let's watch a final video to help this new notation sink in.
Algebra Basics What Are Functions? - Math Antics
We'll return to the Math Antics video to see a breakdown of function notation.
Watch the segment on function notation, from common function notation. The presenter does a great job of explaining what f(x) means and why it's used.
Conclusion
Today, we've formalized the input-output process that we've been touching on for the past few lessons. This concept of a function is a central pillar of mathematics and will be our primary tool for describing the transformations at the heart of linear algebra.
Here are our key takeaways:
- A function is a rule that relates a set of inputs (the domain) to a set of outputs (the range).
- The essential property of a function is that every input has exactly one output. Many-to-one relationships are okay, but one-to-many relationships are not.
- We can think of functions intuitively as machines or visually with mapping diagrams.
- In algebra, functions are often represented by equations, using function notation like , where represents the output for a given input .
In our previous lessons, we learned to work with input-output pairs one at a time. In our next lesson, we will learn how to visualize these pairs together by plotting points on a two-dimensional Cartesian coordinate plane. This will be our first step toward seeing the "shape" of functions and building the geometric intuition that is so crucial for understanding linear algebra.