AP PRECALCULUS • FUNCTIONS INVOLVING PARAMETERS, VECTORS, AND MATRICES

Matrices as Functions

Discover how matrix multiplication defines linear transformations that map input vectors to output vectors.

Historical Context & Motivation

The idea that a matrix can serve as a function—accepting an input and producing a deterministic output—did not emerge overnight. It grew from centuries of work on systems of equations, geometric transformations, and the eventual recognition that these seemingly different problems share a common algebraic backbone. Understanding this history reveals why the matrix-as-function viewpoint is so central to modern mathematics, physics, and data science.

1693
Leibniz and Determinants
Gottfried Wilhelm Leibniz introduced a systematic notation for solving systems of linear equations, foreshadowing the concept of a determinant and implicitly treating coefficient arrays as operational objects.
1858
Cayley Formalizes Matrices
Arthur Cayley published 'A Memoir on the Theory of Matrices,' defining matrix multiplication and explicitly treating matrices as algebraic entities that could be composed, inverted, and studied in their own right.
1888
Peano and Vector Spaces
Giuseppe Peano axiomatized the concept of a vector space, providing the domain and codomain structure needed to view matrix multiplication as a bona fide function between spaces.
1927
Quantum Mechanics and Matrix Theory
Werner Heisenberg's matrix mechanics showed that physical observables are represented by matrices acting as operators on state vectors, cementing the function interpretation of matrices in science.

The unifying insight across these milestones is deceptively simple: when you multiply a matrix A by a vector x, you obtain a new vector b. This operation satisfies the definition of a function: each input vector maps to exactly one output vector. The central question this lesson addresses is: How does treating a matrix as a function deepen our understanding of both matrices and functions?

Core Principles & Definitions

To interpret a matrix as a function, we need to establish precisely what the input is, what the output is, and what properties that mapping possesses. The foundational ideas below build from the definition of a function through to the distinguishing features of linear transformations.

1

Matrix–Vector Product as Mapping

An m × n matrix A defines a function T(x) = Ax that takes a vector in ℝⁿ (the domain) and returns a vector in ℝᵐ (the codomain). Each input has exactly one output.
2

Linearity

A matrix function satisfies two properties: T(u + v) = T(u) + T(v) (additivity) and T(cv) = cT(v) (homogeneity). Together these define a linear transformation.
3

Domain and Codomain

For an m × n matrix, the domain is ℝⁿ (column vectors with n entries) and the codomain is ℝᵐ (column vectors with m entries). The range may be a proper subset of the codomain.
4

Composition Equals Multiplication

If T₁(x) = Ax and T₂(x) = Bx, then the composition T₂ ∘ T₁ is represented by the product BA. Function composition corresponds to matrix multiplication.
KEY TAKEAWAY
KEY TAKEAWAY

Visual Explanation: How a Matrix Transforms the Plane

The most illuminating way to see a matrix acting as a function is to watch it transform every point in the plane simultaneously. The diagram below shows how the 2 × 2 matrix A = [[2, 1], [0, 1]] maps the standard unit square to a parallelogram. Notice that the columns of A become the images of the basis vectors e₁ and e₂.

The left panel shows the unit square spanned by e₁ (cyan) and e₂ (pink). Applying T(x) = Ax with A = [[2, 1], [0, 1]] sends the square to the parallelogram on the right. The columns of A are exactly the images of the basis vectors.

This geometric view highlights a crucial principle: a matrix function is entirely determined by what it does to the basis vectors. Because every vector in the domain is a linear combination of the basis vectors, and the transformation is linear, the images of the basis vectors (i.e., the columns of the matrix) tell you everything about the function. This is why you can reconstruct any m × n matrix from the n images of the standard basis.

Mathematical Framework

We now formalize the connection between matrices and functions. The key equation is the matrix–vector product, which defines the transformation, together with the linearity conditions that characterize it.

MATRIX FUNCTION DEFINITION
T : ℝⁿ → ℝᵐ defined by T(x) = Ax
A is an m × n matrix, x is a column vector in ℝⁿ, and Ax is the resulting column vector in ℝᵐ. The domain is ℝⁿ and the codomain is ℝᵐ.
LINEARITY CONDITIONS
T(u + v) = T(u) + T(v) and T(cv) = cT(v)
For all vectors u, v in ℝⁿ and all scalars c in ℝ. These two properties together are equivalent to T(cu + dv) = cT(u) + dT(v), called superposition.
COLUMN INTERPRETATION
Ax = x₁a₁ + x₂a₂ + ⋯ + xₙaₙ
Each aᵢ is the i-th column of A. The product Ax is a linear combination of the columns of A, weighted by the components of x. This directly connects matrix multiplication to the span of columns.
COMPOSITION
(T₂ ∘ T₁)(x) = T₂(T₁(x)) = B(Ax) = (BA)x
If T₁ corresponds to matrix A (n × p) and T₂ corresponds to matrix B (m × n), then their composition corresponds to the product BA (m × p). Order matters: BA ≠ AB in general.

A profound consequence of the column interpretation is that the range of the matrix function T equals the column space of A. If the columns of A are linearly independent, then T maps ℝⁿ onto an n-dimensional subspace of ℝᵐ. If m = n and the matrix is invertible, T is a bijection and the inverse function is T⁻¹(y) = A⁻¹y, confirming that invertible matrices correspond to invertible functions.

Classification of Common Matrix Transformations

Different matrices encode different geometric operations. By examining the entries of a 2 × 2 matrix, you can predict whether the corresponding function stretches, rotates, reflects, or shears the plane. The table and diagram below catalog the most important families of matrix functions encountered in precalculus and linear algebra.

Common 2 × 2 matrix transformations and their geometric effects
TransformationMatrix Form (2 × 2)Effect on Geometry
Scaling[[k, 0], [0, k]]Enlarges (k > 1) or shrinks (0 < k < 1) all vectors uniformly
Rotation by θ[[cos θ, −sin θ], [sin θ, cos θ]]Rotates every point counterclockwise by angle θ about the origin
Reflection over x-axis[[1, 0], [0, −1]]Flips points across the horizontal axis
Horizontal shear[[1, k], [0, 1]]Tilts vertical lines into slanted lines; horizontal lines stay fixed
Projection onto x-axis[[1, 0], [0, 0]]Collapses every point onto the x-axis (not invertible)
Four transformations applied to an F-shaped region: uniform scaling (cyan), 90° rotation (pink), and horizontal shear (amber). The original (violet) is shown at left for comparison.

A critical detail for the AP exam: the determinant of the matrix equals the signed area scale factor of the transformation. A rotation matrix has determinant 1, so it preserves areas. A projection matrix has determinant 0, reflecting the fact that it collapses two-dimensional inputs onto a line (or point), which has zero area. These connections let you extract geometric meaning directly from algebraic properties.

Worked Example: Matrix Function in Action

Let us apply a matrix function to a concrete geometric problem. We will compute the image of a triangle under a matrix transformation, verify linearity, and interpret the result geometrically.

1
Step 1 — Define the matrix and the inputsLet A = [[1, −1], [2, 0]]. The triangle has vertices P = (1, 0), Q = (0, 1), and R = (1, 1). We treat each vertex as a column vector and compute T(P), T(Q), and T(R) where T(x) = Ax.
2
Step 2 — Compute T(P) = A · PA · [1, 0]ᵀ = [1·1 + (−1)·0, 2·1 + 0·0]ᵀ = [1, 2]ᵀ.
T(P) = (1, 2)
3
Step 3 — Compute T(Q) = A · QA · [0, 1]ᵀ = [1·0 + (−1)·1, 2·0 + 0·1]ᵀ = [−1, 0]ᵀ.
T(Q) = (−1, 0)
4
Step 4 — Compute T(R) = A · RA · [1, 1]ᵀ = [1·1 + (−1)·1, 2·1 + 0·1]ᵀ = [0, 2]ᵀ.
T(R) = (0, 2)
5
Step 5 — Verify linearityNote that R = P + Q. By linearity, T(R) should equal T(P) + T(Q) = (1, 2) + (−1, 0) = (0, 2). This matches our direct computation, confirming the additivity property of the matrix function.
T(P + Q) = T(P) + T(Q) ✓
6
Step 6 — Geometric interpretationThe original right triangle with area ½ is mapped to a new triangle with vertices (1, 2), (−1, 0), and (0, 2). The area of the image is |det(A)| × (original area) = |1·0 − (−1)·2| × ½ = 2 × ½ = 1. The transformation doubled the area, consistent with det(A) = 2.
Image area = |det(A)| × original area = 2 × ½ = 1

Matrices vs. Other Function Types

Matrix functions are one species in a large ecosystem of functions you have encountered in precalculus. Comparing matrix functions with scalar functions and parametric functions clarifies what makes them distinctive and where their limitations lie.

Comparing scalar functions with matrix functions
FeatureScalar Function f(x)Matrix Function T(x) = Ax
DomainSubset of ℝ (single real numbers)ℝⁿ (vectors with n components)
CodomainSubset of ℝℝᵐ (vectors with m components)
LinearityOnly f(x) = kx is linearAlways linear by definition
Compositionf(g(x)); commutative only in special casesBA ≠ AB in general; matrix multiplication is associative but not commutative
InvertibilityRequires one-to-one and onto (passes horizontal line test)Requires det(A) ≠ 0; the inverse function is T⁻¹(y) = A⁻¹y
Can model curvature?Yes (quadratics, exponentials, etc.)No—maps lines to lines; cannot bend straight paths
KEY TAKEAWAY
KEY TAKEAWAY

Connection to Linear Algebra & Beyond

The matrix-as-function viewpoint is not merely a precalculus convenience—it is the conceptual gateway to linear algebra, one of the most widely used branches of mathematics. Below we outline how the ideas from this lesson scale up to more advanced contexts.

From precalculus matrix functions to advanced linear algebra
Precalculus ConceptAdvanced Generalization
T(x) = Ax for a specific matrix AAbstract linear maps T : V → W between any vector spaces, not just ℝⁿ
Columns of A are images of basis vectorsAny linear map is determined by its action on a basis; the matrix is the coordinate representation
det(A) ≠ 0 ⟹ invertibleRank–Nullity Theorem; kernel and image capture all information about injectivity and surjectivity
Rotation and scaling matricesEigenvalue decomposition: every matrix can be analyzed through its eigenvalues and eigenvectors
Composition = matrix multiplicationRepresentation theory: group actions can be studied via matrix representations

If you continue to study mathematics or any quantitative field, the ability to think of a matrix as a function—and vice versa—will serve as a conceptual Swiss Army knife. Computer graphics, machine learning, quantum mechanics, and signal processing all rely on this interpretation daily. Mastering it now builds a foundation for virtually any STEM direction.

Practice Problems

1
A matrix A is 3 × 2. When we define T(x) = Ax, which of the following correctly describes the domain and codomain of T? A. Domain = ℝ³, Codomain = ℝ² B. Domain = ℝ², Codomain = ℝ² C. Domain = ℝ², Codomain = ℝ³ D. Domain = ℝ³, Codomain = ℝ³ E. Domain = ℝ⁶, Codomain = ℝ⁶
2
Let A = [[3, −1], [0, 2]]. What is T(x) = Ax when x = [4, 1]ᵀ? A. (11, 2) B. (13, 2) C. (12, −1) D. (11, 8) E. (5, 2)
3
Matrix B represents a 90° counterclockwise rotation and matrix C = [[2, 0], [0, 2]] represents a scaling by factor 2. If we apply the rotation first and then the scaling, which matrix product represents the composed transformation? A. BC B. CB C. B + C D. B²C E. C²B
PROBLEM 4APPLIED
A computer graphics engine uses a 2 × 2 matrix to transform sprites. The matrix M = [[cos 45°, −sin 45°], [sin 45°, cos 45°]] is applied to a square with vertices at (0, 0), (100, 0), (100, 100), and (0, 100). (a) Compute the image of the vertex (100, 0) under T(x) = Mx. Express your answer in exact form using √2. (b) What is the area of the transformed square? Justify your answer using det(M). (c) A designer wants to first rotate the square by 45° and then scale it by a factor of 3. Write the single matrix that accomplishes both transformations and state its determinant. (d) Is the combined transformation invertible? Explain.
PROBLEM 5CRITICAL THINKING
Let T : ℝ² → ℝ² be a matrix function defined by T(x) = Ax where A = [[a, b], [c, d]]. (a) Prove that T must map the zero vector to itself, i.e., T(0) = 0. (b) Suppose T maps every vector to the zero vector. What can you conclude about the entries of A? What is det(A)? (c) Give an example of a nonzero 2 × 2 matrix A such that T is not one-to-one (i.e., two different input vectors produce the same output). Justify your answer by exhibiting two distinct inputs with the same image.
Varsity Tutors • AP Precalculus • Matrices as Functions