PrepGo

Matrices as Functions - AP PreCalculus Study Guide

Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026

Learn with study guides reviewed by top AP teachers. This guide takes about 18 minutes to read.

The Core Idea: Matrices as Functions

A system of linear equations, such as two equations with two variables, can be represented in a compact and powerful way using matrices. This topic reframes the familiar process of solving a system by introducing the concept of a matrix function. The entire system can be condensed into a single matrix equation, `AX = B$, where is a matrix containing the coefficients of the variables, is a matrix of the variables themselves, and is a matrix of the constants.

This matrix equation can be interpreted as a function, . In this model, the variable matrix acts as the input. The function transforms this input by multiplying it by the coefficient matrix , producing an output matrix. The act of solving the original system of equations is now conceptually equivalent to finding the specific input matrix that produces the constant matrix as the output. This functional perspective provides a new structure for analyzing and working with systems of linear equations.

Key Representation: The Matrix Equation

The primary representation for a system of linear equations in this context is the matrix equation and its corresponding function. All analysis stems from this structure.

The Matrix Equation: AX = B

A system of two linear equations in two variables, such as:

can be rewritten in the matrix form AX = B.

  • is the Coefficient Matrix: This is a square matrix containing the coefficients of the variables from the system. The first row contains the coefficients from the first equation, and the second row contains the coefficients from the second equation.

  • is the Variable Matrix: This is a column matrix (or vector) containing the variables of the system.

  • is the Constant Matrix: This is a column matrix (or vector) containing the constant terms from the right side of the equations.

Putting it all together, the system is represented by the single equation:

The Function Representation:

The matrix equation can be expressed as a function where the input is a matrix.

  • Function Definition:

  • Input: The input to the function is the variable matrix .

  • Process: The function's rule is to multiply the input matrix by the coefficient matrix .

  • Output: The output, , is the resulting matrix from the product AX.

The solution to the system of equations is the specific input `X$ for which the output is equal to the constant matrix .

Understanding Matrix Dimensions in Functions

A critical aspect of working with matrix functions is understanding the role of matrix dimensions. The function is defined only if the matrix product AX is defined.

For matrix multiplication to be defined, the number of columns in the first matrix () must be equal to the number of rows in the second matrix ().

Consider a system of two equations with two variables:

  • The coefficient matrix has dimensions (2 rows, 2 columns).

  • The variable matrix has dimensions (2 rows, 1 column).

The product `AX$ is defined because the number of columns in (which is 2) is equal to the number of rows in (which is 2). The resulting output matrix will have dimensions equal to the number of rows of and the number of columns of , which is . This is crucial, as the output's dimensions must match the dimensions of the constant matrix , which is also .

If the dimensions were not compatible, the function would be undefined for that input X. This structural requirement is fundamental to the matrix representation of linear systems.

Core Concepts & Rules

  • System to Matrix Equation: Any system of two linear equations with two variables can be converted into the matrix equation AX = B.

  • Matrix : The matrix is the coefficient matrix, where each row corresponds to an equation and each column corresponds to a variable.

  • Matrix : The matrix is the variable matrix, structured as a single column containing the variables.

  • Matrix : The matrix is the constant matrix, structured as a single column containing the constants from the right side of each equation.

  • Function Interpretation: The equation `AX = B$ can be viewed as a function .

  • Input and Output: In the function , is the input matrix, and the product AX is the output matrix.

  • Solving as Function Evaluation: Solving the system AX = B is equivalent to finding the input `X$ that yields the specific output for the function .

  • Evaluating the Function: To find the output of the function for a given input matrix, you must perform the matrix multiplication AX.

  • Dimensional Compatibility: The function is only defined if the number of columns in matrix is equal to the number of rows in matrix .

Step-by-Step Example 1: Representing a System and Evaluating the Function

Consider the following system of linear equations:

Part A: Represent the system as a matrix equation AX = B.

Step 1: Identify the coefficient matrix .

The coefficients of and from the first equation (5 and -2) form the first row. The coefficients from the second equation (1 and 3) form the second row.

Step 2: Identify the variable matrix .

The variables are and . They form a single column matrix.

Step 3: Identify the constant matrix .

The constants from the right side of the equations (11 and -9) form a single column matrix.

Step 4: Write the full matrix equation.

Combine the matrices into the form AX = B.

Part B: Define the corresponding function and evaluate it for the input X_0 = \begin{bmatrix} 2 \\ 0 \end{bmatrix}.

Step 1: Define the function.

Using the coefficient matrix from Part A, the function is:

Step 2: Substitute the given input X_0 into the function.

Step 3: Perform the matrix multiplication.

To find the first element of the output matrix, multiply the first row of by the column of :

To find the second element of the output matrix, multiply the second row of by the column of :

Step 4: State the output.

The resulting output matrix is:

This means that for the input X_0$, the function's output is . Since this output is not equal to the constant matrix , the input X_0 = \begin{bmatrix} 2 \ 0 \end{bmatrix}` is not the solution to the original system.

Step-by-Step Example 2: Verifying a Solution Using the Function Model

A system of linear equations is modeled by the function , where the coefficient matrix is . The constant matrix for this system is .

Determine if the matrix is the solution to the system.

Step 1: Understand the question.

The matrix is the solution to the system if and only if . We must evaluate the function at the input `X_s$ and compare the output to .

Step 2: Set up the function evaluation.

We need to calculate the product .

Step 3: Perform the row-by-column matrix multiplication.

  • First row of output: Multiply the first row of by the column of .

  • Second row of output: Multiply the second row of by the column of .

Step 4: Construct the output matrix.

The result of the multiplication is:

Step 5: Compare the output to the constant matrix .

The calculated output is . The target constant matrix is .

These two matrices are not equal because their second-row elements differ ().

Step 6: State the conclusion.

Since , the matrix is not the solution to the system of equations represented by with the constant matrix .

Using Your Calculator

A graphing calculator is an efficient tool for evaluating matrix functions, which involves matrix multiplication. It helps avoid manual calculation errors.

Task: For the function with , evaluate for the input X = \begin{bmatrix} 2 \\ 5 \end{bmatrix}.

Steps (TI-84 Style):

  1. Enter Matrix A:

    • Press [2nd][x⁻¹]to open the MATRIX menu. - Navigate to the `EDIT` tab using the arrow keys. - Select `1: [A]` and press `[ENTER]`. - Set the dimensions to $2x2 by typing [ENTER][ENTER]`.

    • Enter the elements of matrix , pressing [ENTER] after each one: , , , .

  2. Enter Matrix X (as B on calculator):

    • Press [2nd][x⁻¹] (we will use this to store our input matrix ). Press [ENTER]`.

    • Set the dimensions to by typing [ENTER][ENTER].

    • Enter the elements of matrix : , .

  3. Perform the Calculation:

    • Press [2nd][MODE] then to open the MATRIX menu. Under the NAMEStab, select1: [A]and press[ENTER][A][] then again. Under NAMES, select 2: [B] and press `[ENTER][A][B]

      [[-6]

      [43]]

    • Therefore, f\left(\begin{bmatrix} 2 \\ 5 \end{bmatrix}\right) = \begin{bmatrix} -6 \\ 43 \end{bmatrix}`. ## AP Exam Quick Hit ### Common Question Types - **Representing a System:** You will be given a system of two linear equations and asked to identify the correct matrix equation `AX = B` from a set of multiple-choice options. - *Example:* For the system $y = 5x - 1 and , which of the following represents the system in the form AX = B`? (Note: You must first rewrite the first equation in standard form as `-5x + y = -1`). - **Evaluating a Matrix Function:** You will be given a coefficient matrix $A and an input matrix and asked to compute the output of the function f(X) = AX`. - *Example:* If $f(X) = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} X, what is the output for the input X = \begin{bmatrix} 7 \\ -4 \end{bmatrix}?

  • Interpreting the Function Model: You will be asked a conceptual question about the meaning of the matrix function and its relationship to the system of equations.

    • Example: A system of equations is modeled by f(X) = AX. The process of finding the input `X$ such that f(X) = \begin{bmatrix} 0 \\ 0 \end{bmatrix}` is equivalent to which of the following? (Answer: Finding the solution to the corresponding homogeneous system of equations). ### Common Mistakes - **Incorrect Matrix Construction:** When forming the coefficient matrix $A, students may incorrectly place coefficients. For example, for the equation , placing the and in a column instead of a row.
  • Variable and Constant Matrix Dimensions: Setting up or as a row matrix (e.g., ) instead of the correct column matrix (Formula28(x)Formula27(y)Formula26(x) + (b)(y)`).

  • Ignoring Equation Order: When constructing matrix and , the first row of and the first element of B` must come from the same equation. Mixing them up will lead to an incorrect representation. - **Misinterpreting the Solution:** Confusing the evaluation of the function for an arbitrary input with the act of solving. Remember, $f(X) gives an output for any valid input X$, but only the specific where $f(X) = B is the solution to the system.