LINEAR ALGEBRA • LINEAR TRANSFORMATIONS

One-to-One & Onto — One-to-One and Onto Conditions

Discover how functions and transformations can perfectly pair inputs with outputs — and why it matters.

Historical Context & Motivation

When you use a function in math, you take an input and get an output. But have you ever wondered whether two different inputs could produce the same output? Or whether every possible output actually gets used? These are exactly the questions that mathematicians started asking centuries ago. The ideas of one-to-one (injective) and onto (surjective) functions grew out of the need to understand when transformations are reversible and when they cover every element in a target set.

1694
Leibniz Formalizes Functions
Gottfried Wilhelm Leibniz introduced the word "function" to describe a relationship between changing quantities. This set the stage for studying how inputs relate to outputs.
1837
Dirichlet's Modern Definition
Peter Gustav Lejeune Dirichlet defined a function as a rule that assigns exactly one output to each input. This precise definition made it possible to ask: can different inputs share the same output?
1888
Dedekind's Set Theory Contributions
Richard Dedekind formally described injective (one-to-one) mappings between sets, helping mathematicians classify different kinds of functions.
1930s
Bourbaki Group Standardizes Terminology
The French collective Nicolas Bourbaki introduced the terms "injective," "surjective," and "bijective" — the formal names for one-to-one, onto, and both combined.

Today, these ideas are at the heart of linear algebra. When we study linear transformations — functions that stretch, rotate, or flip vectors — knowing whether a transformation is one-to-one, onto, or both tells us whether we can reverse it and recover the original input. This is essential for solving systems of equations, computer graphics, and data science.

Core Principles & Definitions

Before we dive in, let's set up the key vocabulary. A transformation (or function) takes elements from one set (called the domain) and maps them to elements in another set (called the codomain). The range is the collection of outputs that actually get hit. With those ideas in mind, here are the core principles.

1

One-to-One (Injective)

A function is one-to-one if every output comes from exactly one input. No two different inputs ever produce the same output.
2

Onto (Surjective)

A function is onto if every element in the codomain is an output of at least one input. Nothing in the target set is left out.
3

Bijective (Both)

A function that is both one-to-one and onto is called bijective. It creates a perfect pairing between every element of the domain and every element of the codomain.
4

Kernel (Null Space)

The kernel of a linear transformation is the set of all inputs that map to the zero vector. If only the zero vector maps to zero, the transformation is one-to-one.
KEY TAKEAWAY
Think of a vending machine. If every button gives a different snack (no two buttons give the same thing), that's one-to-one. If every snack in the machine can actually be selected by some button, that's onto. A perfect vending machine — where every button gives a unique snack and every snack has a button — is bijective.

Visual Explanation

The best way to understand one-to-one and onto is with mapping diagrams. In these diagrams, the left oval represents the domain (inputs) and the right oval represents the codomain (outputs). Arrows show which input maps to which output. Let's look at three scenarios side by side.

Left panel: One-to-one but not onto — each input maps to a unique output, but element d is never reached. Center panel: Onto but not one-to-one — every output is hit, but inputs 1 and 2 both map to a. Right panel: Bijective — a perfect one-to-one correspondence.

In the left panel, notice that every arrow points to a different output, so no output is repeated. That's what makes it one-to-one. However, element d in the codomain has no arrow pointing to it, so the function is not onto. In the center panel, every element of the codomain has at least one arrow arriving, which makes it onto. But inputs 1 and 2 both land on a, so it's not one-to-one. The right panel shows the ideal case: a bijection, where every input has a unique output and every output is covered.

Mathematical Framework

Now let's translate the visual ideas into precise mathematical conditions. In linear algebra, we work with linear transformations — functions T that map vectors from one space to another while preserving addition and scalar multiplication. A linear transformation can be represented by a matrix A, so that T(x) = Ax.

ONE-TO-ONE CONDITION
T is one-to-one ⟺ T(x) = T(y) implies x = y
Equivalently, the only solution to T(x) = 0 is x = 0. This means the kernel (null space) of T contains only the zero vector.
ONTO CONDITION
T is onto ⟺ For every b in the codomain, there exists x such that T(x) = b
This means the range (image) of T equals the entire codomain. Every vector in the target space is reachable.
MATRIX TEST FOR ONE-TO-ONE
T(x) = Ax is one-to-one ⟺ The columns of A are linearly independent
If A is an m × n matrix, the columns are linearly independent when rank(A) = n (number of columns). This means no column is a combination of the others.
MATRIX TEST FOR ONTO
T(x) = Ax is onto ⟺ The columns of A span the codomain
If A is an m × n matrix, the columns span ℝᵐ when rank(A) = m (number of rows). Every row of the row-reduced matrix has a pivot.
💡 Quick Tip
For a square matrix (same number of rows and columns), one-to-one and onto happen together! If one holds, the other automatically does too. This is because rank(A) = n = m.

Detailed Breakdown of Conditions

Let's organize the conditions for one-to-one and onto into a clear reference. When you're given a matrix A and want to determine whether T(x) = Ax is one-to-one, onto, both, or neither, you can check several equivalent conditions. The diagram below shows the decision process visually.

Start by row reducing the matrix A and finding its rank. Compare the rank to the number of columns (for one-to-one) and the number of rows (for onto). If both conditions are met, the transformation is bijective and invertible.
Side-by-side comparison of one-to-one and onto conditions for T(x) = Ax
ConditionOne-to-One (Injective)Onto (Surjective)
Rank requirementrank(A) = n (# of columns)rank(A) = m (# of rows)
Kernel conditionKernel = {0} onlyNo restriction on kernel
Pivot positionEvery column has a pivotEvery row has a pivot
Size requirementNeeds m ≥ n (at least as many rows as columns)Needs n ≥ m (at least as many columns as rows)
Equation Ax = bAt most one solution for every bAt least one solution for every b

Worked Example

Let's put everything together with a concrete example. Suppose we have the linear transformation T : ℝ³ → ℝ² defined by the matrix:

GIVEN MATRIX
A = [ 1 2 3 ; 4 5 6 ] (2 × 3 matrix, so m = 2, n = 3)
This matrix has 2 rows and 3 columns. We want to know: is T one-to-one? Is T onto?
Determine if T is One-to-One and/or Onto
1
Step 1 — Row Reduce the MatrixWe perform row reduction on A. Start with the original matrix. Replace Row 2 with (Row 2 − 4 × Row 1): [ 1 2 3 ] [ 0 −3 −6 ] Then divide Row 2 by −3: [ 1 2 3 ] [ 0 1 2 ]
Row echelon form: [ 1 2 3 ; 0 1 2 ]
2
Step 2 — Find the RankCount the number of pivot positions (leading 1s). Row 1 has a pivot in column 1, and Row 2 has a pivot in column 2. That gives us 2 pivots.
rank(A) = 2
3
Step 3 — Check One-to-OneFor one-to-one, we need rank(A) = n, where n = 3 (the number of columns). We found rank(A) = 2, and 2 ≠ 3. Column 3 does not have a pivot, which means there is a free variable. This means the kernel contains non-zero vectors.
T is NOT one-to-one because rank(A) = 2 < 3 = n.
4
Step 4 — Check OntoFor onto, we need rank(A) = m, where m = 2 (the number of rows). We found rank(A) = 2, and 2 = 2. Every row has a pivot, so the columns of A span all of ℝ².
T IS onto because rank(A) = 2 = m.
5
Step 5 — ConclusionThe transformation T maps ℝ³ → ℝ² and is onto but not one-to-one. This makes sense intuitively: we're squishing a 3-dimensional space into 2 dimensions, so some information must be lost (not one-to-one), but we can reach every point in the 2D target (onto).
T is surjective (onto) but not injective (one-to-one)

Comparisons & Common Mistakes

Students often mix up one-to-one and onto, or confuse the conditions. The table below highlights the key differences and common pitfalls to avoid.

Comparing one-to-one and onto: key features and common mistakes
FeatureOne-to-One (Injective)Onto (Surjective)
Plain EnglishNo two inputs share an outputEvery output is actually used
What can go wrongDifferent inputs collapse to the same outputSome outputs in the codomain are never reached
Check via rankrank = number of columnsrank = number of rows
Check via equation Ax = bAt most one solution for each bAt least one solution for each b
Horizontal line test (for graphs)Every horizontal line hits the graph at most onceEvery horizontal line hits the graph at least once
Common mistakeConfusing 'one-to-one' with 'one output per input' — all functions have that!Confusing codomain with range — onto means range = codomain
KEY TAKEAWAY
Think of a classroom seating chart. One-to-one means no two students sit in the same seat. Onto means every seat has a student. If both conditions hold, you have a perfect match — every student in a unique seat, every seat filled. That's bijective, and you can reverse the assignment to find which student sits where.

Connection to Invertibility & Advanced Theory

The concepts of one-to-one and onto connect directly to one of the biggest ideas in linear algebra: invertibility. A square matrix A is invertible (meaning A⁻¹ exists) if and only if the transformation T(x) = Ax is both one-to-one and onto. This single idea ties together many topics you'll encounter as you go deeper into the subject.

How one-to-one and onto connect to advanced linear algebra topics
Concept in This LessonAdvanced Connection
One-to-one (kernel = {0})Leads to the Rank-Nullity Theorem: rank + nullity = n
Onto (range = codomain)Connected to the column space equaling ℝᵐ
Bijective (both)Matrix is invertible; determinant ≠ 0; all eigenvalues are non-zero
Not one-to-one (free variables)Infinitely many solutions to Ax = b when solutions exist
Not onto (rank < m)Some systems Ax = b have no solution at all

As you continue studying linear algebra, you'll see that the Invertible Matrix Theorem lists over a dozen equivalent conditions — and one-to-one and onto are two of the most important ones on that list. You'll also learn about determinants and eigenvalues, which provide alternative ways to test these same conditions. The ideas from this lesson form the foundation for all of that.

Practice Problems

PROBLEM 1CONCEPTUAL
A function f maps the set {1, 2, 3} to the set {a, b, c, d} with f(1) = a, f(2) = c, and f(3) = d. Is f one-to-one? Is f onto? Explain your reasoning.
PROBLEM 2BASIC CALCULATION
Let A = [ 1 0 ; 0 1 ; 2 3 ]. This is a 3 × 2 matrix. Find the rank of A and determine whether T(x) = Ax is one-to-one and/or onto.
PROBLEM 3INTERMEDIATE
Consider A = [ 1 2 1 ; 0 1 1 ; 1 3 2 ]. Show that T(x) = Ax is not one-to-one by finding a non-zero vector in the kernel (a non-zero x such that Ax = 0).
PROBLEM 4APPLIED
A factory has 3 machines that produce 2 types of products. The production rates are described by the matrix A = [ 2 1 3 ; 1 4 2 ] where each column represents a machine's output for each product type. Can the factory produce any combination of product quantities (is the transformation onto)? Can we uniquely determine each machine's run-time from the products made (is it one-to-one)?
PROBLEM 5CRITICAL THINKING
Prove or disprove: If a linear transformation T : ℝⁿ → ℝⁿ (same dimension for domain and codomain) is one-to-one, then it must also be onto. Explain your reasoning using what you know about rank.

Lesson Summary

A one-to-one (injective) transformation maps different inputs to different outputs — no two inputs ever collide. For a matrix A, this requires rank(A) = n (the number of columns), which means every column has a pivot and the kernel contains only the zero vector. An onto (surjective) transformation hits every element of the codomain — nothing is left out. This requires rank(A) = m (the number of rows), meaning every row has a pivot and the range equals the entire codomain.

When a transformation is both one-to-one and onto, it is called bijective, and for square matrices this is equivalent to being invertible. To test these properties, row reduce the matrix and compare the rank to the number of columns and rows. These foundational ideas connect to the determinant, eigenvalues, and the Invertible Matrix Theorem — topics that build directly on what you've learned here.

Varsity Tutors • Linear Algebra • One-to-One & Onto — One-to-One and Onto Conditions