| Study Guides
AP · Matrices as functions · 14 min read · Updated 2026-05-10

Matrices as functions — AP Precalculus Study Guide

For: AP Precalculus candidates sitting AP Precalculus.

Covers: matrix-vector multiplication as linear function transformations, domain and codomain for matrix functions, composition of matrix functions, inverse matrix functions, and 2D geometric transformations represented by matrix functions.

You should already know: Matrix dimension rules for multiplication, inverse calculation for 2x2 matrices, basic vector notation.

A note on the practice questions: All worked questions in the "Practice Questions" section below are original problems written by us in the AP Precalculus style for educational use. They are not reproductions of past College Board / Cambridge / IB papers and may differ in wording, numerical values, or context. Use them to practise the technique; cross-check with official mark schemes for grading conventions.


1. What Is Matrices as functions?

In AP Precalculus Unit 4, matrices are not just static arrays of numbers—they are linear functions that map input vectors to output vectors. This topic makes up approximately 8-10% of Unit 4 content, and typically appears on both multiple-choice (MCQ) and free-response (FRQ) sections of the exam, often paired with geometric transformations or vector applications. By definition, an matrix defines a function , where the input is an -dimensional column vector , and the output is the product , an -dimensional column vector. Unlike general non-linear functions, matrix functions are linear, meaning they satisfy two core properties: for any scalar , and for any input vectors . Synonyms for matrix functions include linear transformations and linear maps, terms you may encounter in exam questions. This framework unifies many geometric and algebraic operations, turning scaling, rotation, and reflection into computable matrix products.

2. Matrix-Vector Multiplication as Function Evaluation

When we treat a matrix as a function, evaluating the function at a vector input is exactly matrix-vector multiplication. The dimension rules for multiplication align naturally with function domain and codomain: an matrix accepts vectors, so its domain is all of , and outputs vectors, so its codomain is all of . For a general matrix and input vector : the output is calculated by taking the dot product of each row of with : This matches the linearity property of matrix functions: scaling an input scales the output by the same factor, and adding two inputs gives the sum of their outputs. AP exam questions commonly ask you to evaluate a matrix function at a given input or identify the domain and codomain from matrix dimensions.

Worked Example

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: .

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 MCQs.

3. Composition of Matrix Functions

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 an matrix , and defined by a 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. The dimension rule for composition matches standard matrix multiplication rules: to multiply , the number of columns of must equal the number of rows of , which is exactly the requirement that the codomain of the inner function matches the domain of the outer function. Unlike scalar function multiplication, matrix composition is not commutative, so order always changes the result for most pairs of matrices.

Worked Example

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 .

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

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 by a factor , 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 because 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. AP questions often ask you to find the final position of a point after multiple transformations, or write the combined matrix for a sequence of transformations.

Worked Example

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. Multiply the combined matrix by the input position vector :
  5. 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. Common Pitfalls (and how to avoid them)

  • 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 , codomain .
  • 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 generalize that all square matrices are invertible, which is false. 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.

6. Practice Questions (AP Precalculus Style)

Question 1 (Multiple Choice)

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:

Worked Solution: For a matrix function defined by an matrix, domain is (where is the number of columns) and codomain is (where is the number of rows). The given matrix has 3 rows and 2 columns, so and . This gives domain and codomain , matching option B. Options A, C, and D swap or misidentify the dimensions. The correct answer is B.


Question 2 (Free Response)

Let be the matrix function representing a 30° counterclockwise rotation around the origin, and be the matrix function representing a reflection over the y-axis. (a) Write the 2×2 matrix for each of and . (b) Find the matrix for the composition , which is rotation by 30° CCW followed by reflection over the y-axis. (c) Explain why has a different matrix than for this problem.

Worked Solution: (a) For a 30° CCW rotation, the rotation matrix is: Reflection over the y-axis flips the sign of the x-coordinate, so its matrix is:

(b) For , is applied first so it is the inner function, so the combined matrix is :

(c) Matrix multiplication (and thus composition of matrix functions) is not commutative in general, meaning for most pairs of matrices. is reflection applied first, then rotation, which is a different sequence of transformations that changes the final position of most input points, resulting in a different combined matrix.


Question 3 (Application / Real-World Style)

A video game designer uses matrix functions to transform character positions on a 2D screen, with the origin at the center of the screen. A character's hand has a vertex at position (units in centimeters). The designer wants to rotate the hand 30° clockwise around the origin to animate a wave, then scale it by a uniform factor of 1.5 (along both axes) to make the hand larger. What is the final position of the vertex after both transformations, rounded to one decimal place?

Worked Solution: First, write the matrix for each transformation: A 30° clockwise rotation has , so: Uniform scaling by 1.5 has matrix . Rotation is applied first, so the combined matrix is : Multiply by the input vector : In context, after rotating and scaling, the vertex of the character's hand is located 7.5 cm right and 0.9 cm up from the center of the screen.

7. Quick Reference Cheatsheet

Category Formula 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

8. What's Next

This chapter is the foundational prerequisite for all further work with matrices and linear transformations in AP Precalculus. Immediately after this topic, you will apply this framework to finding inverses of matrix functions and solving linear systems using matrix inverses, which rely entirely on understanding matrices as functions rather than just static arrays of numbers. Without mastering the order of composition, dimension matching, and geometric interpretation of matrix functions, you will struggle to correctly solve multi-step transformation problems and linear system problems that appear frequently on the AP exam. This topic also connects to parametric and vector functions you learned earlier in Unit 4, and provides a core foundation for linear algebra and multivariable calculus you will encounter in post-AP coursework.

← Back to topic

Stuck on a specific question?
Snap a photo or paste your problem — Ollie (our AI tutor) walks through it step-by-step with diagrams.
Try Ollie free →