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.

Linear Algebra emblem with a matrix grid, a variable, and three-dimensional axes.
Inside this lesson 10 sections 5 questions 10 figures

SECTION 1

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.

SECTION 2

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.

SECTION 3

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.

One-to-One (Not Onto)Onto (Not One-to-One)Bijective (Both)DomainCodomain123abcdd not hit!✓ One-to-One ✗ OntoDomainCodomain1234abc1 & 2 → a✗ One-to-One ✓ OntoDomainCodomain123abc✓ One-to-One ✓ Onto
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.

SECTION 4

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

Tisone−to−one⟺T(x)=T(y)impliesx=yT 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

Tisonto⟺Foreverybinthecodomain,thereexistsxsuchthatT(x)=bT 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)=Axisone−to−one⟺ThecolumnsofAarelinearlyindependentT(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)=Axisonto⟺ThecolumnsofAspanthecodomainT(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.

SECTION 5

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.

Decision Flowchart: Is T One-to-One or Onto?Given: A is m × n matrixRow reduce A → find rank(A)Check: rank(A) = n?(n = number of columns)Check: rank(A) = m?(m = number of rows)YesNoYesNoT isONE-TO-ONET is NOTone-to-oneT isONTOT is NOTontoIf BOTH: T isBIJECTIVE (Invertible)
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.
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

Side-by-side comparison of one-to-one and onto conditions for T(x) = Ax

SECTION 6

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=[123;456](2×3matrix,som=2,n=3)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. 1

    Step 1 — Row Reduce the Matrix

    We 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. 2

    Step 2 — Find the Rank

    Count 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. 3

    Step 3 — Check One-to-One

    For 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. 4

    Step 4 — Check Onto

    For 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. 5

    Step 5 — Conclusion

    The 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)

SECTION 7

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.

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

Comparing one-to-one and onto: key features and common mistakes

✦

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.

SECTION 8

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.

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

How one-to-one and onto connect to advanced linear algebra topics

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.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

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.
Show answer
The function f is one-to-one because each input maps to a different output: 1 → a, 2 → c, 3 → d, and no two inputs share the same output. However, f is not onto because the element b in the codomain {a, b, c, d} is never reached by any input. For f to be onto, every element in the codomain would need to be an output of at least one input. Since b is left out, the range {a, c, d} does not equal the codomain {a, b, c, d}.

Question 2: BASIC 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.
Show answer
Row reduce A: The first two rows are already in echelon form with pivots in columns 1 and 2. Replace Row 3 with (Row 3 − 2 × Row 1 − 3 × Row 2) to get [ 1 0 ; 0 1 ; 0 0 ]. The rank is 2. For one-to-one, we need rank = n = 2 (number of columns), and 2 = 2, so T is one-to-one. For onto, we need rank = m = 3 (number of rows), but 2 ≠ 3, so T is not onto. This makes sense: we're mapping from ℝ² into ℝ³, so we can't possibly fill all of 3D space with outputs from a 2D input.

Question 3: INTERMEDIATE

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).
Show answer
Row reduce A: Replace Row 3 with (Row 3 − Row 1) to get [ 1 2 1 ; 0 1 1 ; 0 1 1 ]. Then replace Row 3 with (Row 3 − Row 2) to get [ 1 2 1 ; 0 1 1 ; 0 0 0 ]. The rank is 2, but n = 3, so there is a free variable (x₃). From Row 2: x₂ + x₃ = 0, so x₂ = −x₃. From Row 1: x₁ + 2x₂ + x₃ = 0, so x₁ = −2(−x₃) − x₃ = x₃. Setting x₃ = 1 gives x = (1, −1, 1). You can verify: A × (1, −1, 1) = (1−2+1, 0−1+1, 1−3+2) = (0, 0, 0). Since a non-zero vector maps to zero, the kernel is non-trivial, confirming T is not one-to-one.

Question 4: APPLIED

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)?
Show answer
The matrix A is 2 × 3, so m = 2 and n = 3. Row reduce: Replace Row 2 with (2 × Row 2 − Row 1) to get [ 2 1 3 ; 0 7 1 ]. Both rows have pivots, so rank(A) = 2. Since rank = m = 2, the transformation is onto — the factory can produce any desired combination of the two product quantities. However, since rank = 2 ≠ 3 = n, the transformation is not one-to-one. This means there are multiple ways to set the machines' run-times to achieve the same product output. There is one free variable, giving infinitely many solutions for each target output.

Question 5: CRITICAL 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.
Show answer
This statement is true. Here's why: If T is represented by an n × n matrix A, then one-to-one means rank(A) = n (the number of columns). But since A is square, the number of rows m also equals n. So rank(A) = n = m, which is exactly the onto condition. Therefore, for a square matrix, one-to-one automatically implies onto. The reverse is also true: onto implies one-to-one for square matrices. This is a special property of square matrices that does not hold for non-square matrices. For example, a 3 × 2 matrix can be one-to-one but not onto, and a 2 × 3 matrix can be onto but not one-to-one, as we saw in earlier examples.

SUMMARY

Lesson Summary

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