Matrices as functions
AP Precalculus· AP Precalculus CED — Functions Involving Parameters, Vectors, and Matrices· 14 min read
1. Core Definition of Matrix Functions★★☆☆☆⏱ 3 min
In AP Precalculus Unit 4, matrices are framed not just as static arrays of numbers, but as linear functions that map input vectors to output vectors. This topic makes up 8-10% of Unit 4 content, appearing on both multiple-choice and free-response exam sections, often paired with geometric transformations or vector applications.
Matrix Function
, where is an matrix, is an column vector
A linear function that maps -dimensional input vectors to -dimensional output vectors via matrix-vector multiplication. Also called a linear transformation or linear map.
Example:
A matrix defines a function from to
Unlike general non-linear functions, all matrix functions satisfy two core linearity properties: for any scalar , and for any input vectors . This framework unifies many geometric and algebraic operations, turning scaling, rotation, and reflection into easily computed matrix products.
2. Matrix-Vector Multiplication as Function Evaluation★★☆☆☆⏱ 4 min
When treating a matrix as a function, evaluating the function at a vector input is exactly matrix-vector multiplication. Dimension rules for multiplication align directly with function domain and codomain rules: an matrix accepts vectors, so its domain is all of , and outputs vectors, so its codomain is all of .
The output is calculated by taking the dot product of each row of with :
Given the matrix function , (a) state the domain and codomain of , (b) find .
- 1
Identify matrix dimensions: the given matrix has 2 rows and 3 columns, so it is a matrix.
- 2
Apply the domain/codomain rule: an matrix has domain and codomain , so domain of is (all 3-dimensional input vectors) and codomain is (all 2-dimensional output vectors).
- 3
Evaluate the first entry of the output as the dot product of the first row and input vector: .
- 4
Evaluate the second entry as the dot product of the second row and input vector: .
- 5
Combine entries to get the output:
- 6
Exam tip:
Always confirm that the input vector dimension matches the number of columns of the matrix before multiplying—if it does not, the function is undefined at that input, a common trick answer for multiple-choice questions.
3. Composition of Matrix Functions★★★☆☆⏱ 4 min
Just like any other function, matrix functions can be composed if the output dimension of the inner function matches the input dimension of the outer function. For two functions (defined by matrix ) and (defined by matrix ), the composition simplifies to matrix multiplication: .
This means composition of matrix functions is exactly equivalent to matrix multiplication, with the same right-to-left order as function composition: the inner (first applied) function’s matrix goes on the right, and the outer (second applied) function’s matrix goes on the left. Unlike scalar function multiplication, matrix composition is not commutative, so order always changes the result for most pairs of matrices.
Let and . Find the matrix that defines the composition .
- 1
Recall that , so is the inner function and is the outer function. The matrix for the composition is the product , where and .
- 2
Calculate the first row of the product: first entry = , second entry = .
- 3
Calculate the second row of the product: first entry = , second entry = .
- 4
The resulting matrix for is:
- 5
Exam tip:
If the question asks for (f after g) instead of , reverse the order of multiplication to , not . Never assume order does not matter.
4. Geometric Transformations as Matrix Functions★★★☆☆⏱ 5 min
All linear 2D geometric transformations can be represented as 2×2 matrix functions that map input position vectors to output transformed position vectors. Common transformations tested on the AP exam include uniform scaling, reflection over the x-axis, y-axis, or line , and rotation around the origin.
Each of these transformations is linear, so they fit the matrix function framework, and all are invertible when their determinants are non-zero. When multiple transformations are applied in sequence, the combined transformation matrix is found by composing the individual matrix functions, following the right-to-left order rule.
Find the image of the point after a 90° counterclockwise rotation around the origin followed by a reflection over the x-axis.
- 1
Write the matrix for each transformation: A 90° counterclockwise rotation has , , so rotation matrix . Reflection over the x-axis has matrix .
- 2
Rotation is applied first, then reflection, so the composition is reflection rotation, and the combined matrix is .
- 3
Calculate the product:
- 4
- 5
Multiply the combined matrix by the input position vector :
- 6
- 7
The final image of the point is .
Exam tip:
Always order transformation matrices with the first applied transformation on the right of the product, because it is the inner function in the composition.
5. Concept Check★★☆☆☆⏱ 2 min
Test your understanding of core domain and codomain rules:
Let be a matrix function defined by , where . What is the domain and codomain of ?
A) Domain: , Codomain:
B) Domain: , Codomain:
C) Domain: , Codomain:
D) Domain: , Codomain:
Reveal answer
1 —Correct! An matrix has domain (number of columns = 2) and codomain (number of rows = 3).
6. Common Pitfalls
Wrong move:
Stating that a matrix function has domain and codomain
Why:
Students mix up rows and columns when matching matrix dimensions to domain/codomain
Correct move:
Remember columns = input dimension, rows = output dimension, so domain is and codomain is
Wrong move:
Writing the combined transformation matrix for 'rotation first, then reflection' as instead of
Why:
Students confuse the order of function composition, treating written order as left-to-right
Correct move:
Always write the last applied transformation on the left, first applied on the right
Wrong move:
Assuming all 2×2 matrix functions are invertible
Why:
Students incorrectly generalize that all square matrices are invertible
Correct move:
Always check that the determinant of the matrix is non-zero before concluding the inverse function exists
Wrong move:
Using the counterclockwise rotation matrix for a clockwise rotation by
Why:
Students memorize the rotation matrix but do not account for direction
Correct move:
For clockwise rotation, substitute into the rotation formula to flip the sign of the sine terms
Wrong move:
Calculating by taking the dot product of columns of with
Why:
Students confuse matrix-vector multiplication with column combinations when working with column vectors
Correct move:
Always use row times vector for matrix-vector multiplication with column inputs, the standard in AP Precalculus
Wrong move:
Writing the matrix for as instead of
Why:
Students match the written order of then to left-to-right matrix order
Correct move:
Read as 'g after f', so f is done first and goes on the right
7. Quick Reference Cheatsheet
Category | Formula/Rule | Notes |
|---|---|---|
Domain/Codomain ( matrix) | Domain: , Codomain: | = number of columns (input dimension), = number of rows (output dimension) |
Matrix Function Evaluation | Output entries are dot product of each row of with | |
Composition of Matrix Functions | has matrix | = first applied (inner) function, = second applied (outer) function |
2D Rotation (CCW by ) | Use for clockwise rotation | |
2D Reflection over x-axis | Flips the sign of the y-coordinate | |
2D Reflection over y-axis | Flips the sign of the x-coordinate | |
2D Reflection over | Swaps the x and y coordinates | |
Uniform 2D Scaling by | Multiplies both coordinates by | |
Invertibility of Matrix Function | Inverse exists iff | Inverse function is given by |
When this came up on past exams
AI-estimated based on syllabus patterns — cross-check with official past papers for accuracy. Use only as revision-focus signals.
- 2024 · AP Precalculus
Domain/codomain identification MCQ
- 2023 · AP Precalculus
Geometric transformation composition FRQ
What's Next
This subtopic is the foundational prerequisite for all further work with matrices and linear transformations in AP Precalculus. The framework of matrices as functions underpins all applications of matrices to solving linear systems, modeling transformations, and analyzing vector relationships that you will encounter next in Unit 4. Mastering the order of composition and domain/codomain rules here will prevent common errors on more complex topics like inverse matrix functions and solving systems of linear equations, which are heavily tested on the AP exam. Building on this foundation, you will also learn how to use matrix functions to model real-world situations like computer graphics transformations, which often appear in free-response application questions.
