AP Precalculus · Unit 4 · Topics 4.10–4.14

Matrices

Start with rows and columns. Then use the same multiplication rule to solve a system, rotate a triangle and predict how two groups change over time.

Open graph-paper notebook beside a scientific calculator

Read a matrix by rows and columns

A matrix organizes numbers in a rectangular array. Its dimensions are written rows first, columns second. In an m×n matrix A, the entry aij is in row i, column j.

A=(2−10435)

This matrix has dimensions 2×3. For instance, a23=5 because the second row's third entry is 5.

TermHow to recognize it
Square matrixn×n, with the same number of rows and columns
Row matrix1×n, with one row
Column matrixm×1, with one column
Zero matrixEvery entry is 0. Any dimensions are possible.
Main diagonalEntries a11,a22,a33,…

Choose the identity of the correct size

An identity matrix In is square, with 1 on the main diagonal and 0 elsewhere. It acts like a multiplicative identity.

I2=(1001)
I3=(100010001)

For an m×n matrix, ImA=AIn=A. A 2×3 matrix uses I2 on the left and I3 on the right. For a square matrix the two identity sizes agree.

Course scope. Topics 4.10–4.14 are optional AP Precalculus classroom material. The AP exam assesses Units 1–3. The hand calculations below focus on the products, inverses, determinants, plane transformations and two-state models in the framework. The original 3×3 methods are included as extensions.

Add, subtract and scale entries

Add or subtract corresponding entries only when both matrices have the same dimensions. A 2×3 matrix and a 3×2 matrix both contain six numbers, but their dimensions are different.

(A+B)ij=aij+bij (A−B)ij=aij−bij

Worked example · Add corresponding positions

A=(2314)B=(5123)
A+B=(2+53+11+24+3) A+B=(7437)

Multiply every entry by a scalar

A scalar is a single number. If a matrix is multiplied by c, the dimensions stay the same and (cA)ij=caij.

Worked example · Scale by three

3(2−140)=(6−3120)

Worked example · Find a linear combination

A=(1234)B=(0121)

Scale each matrix first.

2A=(2468)3B=(0363)

Then subtract by position.

2A−3B=(2−04−36−68−3) 2A−3B=(2105)

Multiply one row by one column

Start with the dimensions. The number of columns in the first matrix must equal the number of rows in the second. The two outer dimensions give the product's size.

Am×nBn×p=Cm×p

To find the entry in row i, column j of AB, pair row i from A with column j from B. Multiply along the pairs and add.

(AB)ij=∑k=1naikbkj

Worked example · Trace the four entries of a product

Choose an output entry. Its row in the first matrix, column in the second matrix, and position in the result are shaded.

First matrix(1234)
Second matrix(5678)
Product(19224350)
(AB)11=1·5+2·7(AB)11=5+14=19
(AB)12=1·6+2·8(AB)12=6+16=22
(AB)21=3·5+4·7(AB)21=15+28=43
(AB)22=3·6+4·8(AB)22=18+32=50

In reverse order, the first row starts with 5·1+6·3=23. The full reverse product is

BA=(23343146).

Here AB≠BA. For rectangular matrices, the reverse product may even be undefined.

Worked example · Multiply a rectangular matrix by a vector

A 2×3 matrix times a 3×1 column vector gives a 2×1 result.

U=(1203−14)v=(2−11)
Uv=(2−2+06+1+4) Uv=(011)

The reverse product vU is undefined because the inner dimensions would be 1 and 2.

Use the properties that preserve order

These identities apply when every operation shown is defined.
PropertyRule
Addition orderA+B=B+A
Addition groupingA+(B+C)=(A+B)+C
Multiplication groupingA(BC)=(AB)C
DistributionA(B+C)=AB+AC and (A+B)C=AC+BC
IdentityImA=AIn=A for m×n matrix A
Transpose of a product(AB)T=BTAT

The transpose AT turns rows of A into columns. The transpose of an m×n matrix has size n×m. Transposing a product reverses the order of its factors.

Use the determinant to find an inverse

The determinant det(A) is a single number defined for a square matrix. To compute it for a 2×2 matrix, multiply down the main diagonal, then subtract the product along the other diagonal.

det(abcd)=ad−bc

Worked example · Find a determinant and an area

A=(3214) det(A)=3·4−2·1=10

As column vectors, (31) and (24) span a parallelogram with area 10 square units. Swapping the columns changes the determinant to −10 and leaves the area at 10.

In the plane, |det(A)| gives the area scale factor of the transformation. If the determinant is zero, the columns are linearly dependent. They lie on the same line through the origin, or one or both are the zero vector. The parallelogram has area 0.

The inverse takes you back to the input

When it exists, A−1 satisfies AA−1=A−1A=I. A square matrix has an inverse exactly when its determinant is nonzero. A square matrix with determinant zero is called singular.

A−1=1ad−bc(d−b−ca)
  1. Compute ad−bc and check that the result is nonzero.
  2. Swap a and d, then change the signs of b and c.
  3. Multiply the whole matrix by 1ad−bc and check that the product with A is the identity.

Worked example · Invert a matrix with a negative determinant

A=(4332) det(A)=4·2−3·3=−1 A−1=1−1(2−3−34) A−1=(−233−4)

Multiplying in either order gives I2. The negative determinant is nonzero, so the inverse exists.

On a graphing calculator, enter the matrix with its row and column sizes, then use the determinant function or apply the inverse operation to the stored matrix. Multiply back by the original matrix to check the result.

Extension · Determinants and inverses for 3×3

You can expand a 3×3 determinant along any row or column. Delete the entry's row and column and take the determinant of the remaining 2×2 matrix to find its minor. The cofactor signs across the first row are +,−,+.

D=(123456789) M11=det(5689)=−3 M12=det(4679)=−6 M13=det(4578)=−3

Combine the signed products 1(−3)=−3, −2(−6)=12, and 3(−3)=−9. They sum to 0.

Since det(D)=0, this D is singular. You can also use Sarrus' rule for a 3×3 determinant by repeating the first two columns and subtracting the sum of upward diagonal products from the sum of downward diagonal products.

For an invertible square matrix of this size, A−1=1det(A)adj(A), where the adjugate is the transpose of the signed cofactor matrix. In three dimensions, |det(A)| gives the volume scale factor.

Solve a system with an inverse matrix

Write the coefficients of each equation as a row of A, the unknowns as a column X, and the right-hand constants as a column B. In AX=B, multiply both sides on the left by A−1, when it exists.

A−1AX=A−1B X=A−1B

Worked example · Solve two equations together

{2x+3y=7x+2y=4 (2312)(xy)=(74)

The coefficient matrix has determinant 4−3=1, so its inverse is (2−3−12).

X=(2−3−12)(74) X=(14−12−7+8)=(21)

Check x=2 and y=1 in both original equations. They give 7 and 4, respectively.

If A is singular, a square system may be inconsistent or have infinitely many solutions. Use elimination to distinguish these cases. For a matrix equation in the order XA=B with invertible A, multiply on the right to obtain X=BA−1.

Transform points and shapes with matrices

A 2×2 matrix M defines a linear transformation T(v)=Mv of vectors in the plane. Each output coordinate is a sum of multiples of the input coordinates, so the origin maps to the origin.

(x′y′)=M(xy)

To build M from a transformation, transform (1,0) and (0,1). Their images become the first and second columns of M. With a polygon, place the vertex coordinates in the columns of a 2×n matrix. Each column of the product then gives one transformed vertex.

TransformationMatrixImage of (x,y)
Reflect across the x-axis(100−1)(x,−y)
Reflect across the y-axis(−1001)(−x,y)
Reflect across y=x(0110)(y,x)
Scale about the origin by k(k00k)(kx,ky)
Rotate counterclockwise by θ(cos(θ)−sin(θ)sin(θ)cos(θ))Read the two row-by-column products.
Rotate 90∘ counterclockwise(0−110)(−y,x)

Worked example · Rotate a point 90∘ counterclockwise

The first basis vector maps to (0,1), and the second to (−1,0). Put those images in the columns of R, then multiply the column vector p for (3,2).

R=(0−110) Rp=(0(3)+(−1)(2)1(3)+0(2)) Rp=(−23)
A solid green triangle and a dashed purple triangle show a counterclockwise quarter turn. The origin is shared, and the point three, two moves to negative two, three.
The image of (3,2) is (−2,3). The origin stays fixed and (4,0) moves to (0,4).

The inverse uses the opposite turn. It maps (−2,3) back to (3,2).

Compose transformations in the order they happen

If R rotates and F reflects across the x-axis, rotating first and reflecting second gives FRv=F(Rv). The rightmost matrix acts first. From (3,2), this order gives (−2,−3). Applying F first and then R gives (2,3).

When M is invertible, the reverse transformation is M−1. Composition with M−1 in either order maps every vector back to itself.

Predict changes with a two-state model

Suppose a group of 150 students uses two study rooms. Each day, 20% of Room A's students switch to B and 10% of Room B's students switch to A. Assume the same group and transition rates each day. Write the counts in a state vector sn with Room A first.

T=(0.800.100.200.90)

Column one describes students starting in Room A and column two describes students starting in Room B. Each column adds to 1. The first row collects everyone expected in A at the next step. The second row collects everyone expected in B.

sn+1=Tsn,sn=Tns0

Worked example · Move forward, backward and toward a steady state

Start with s0=(12030). Multiply by T to obtain the next expected counts.

s1=Ts0=(96+324+27) s1=(9951)

A second step gives s2=(84.365.7). Decimal counts are model estimates. The total remains 150 at each step.

For a steady state (uv), the distribution stays fixed after another step. The expected flow from A to B equals the flow from B to A.

0.20u=0.10vu+v=150

Thus v=2u, so u=50 and v=100. The model approaches these counts from the starting distribution. Since det(T)=0.70, you can also multiply a later vector by T−1 to recover the previous state in the exact model. For example, T−1s1=s0.

Check the context. If reverse multiplication applied to rounded or measured counts yields a negative value, that vector cannot describe actual groups. Check the initial assumptions and input data.

Quick reference

TaskCheck or formula
Add or subtractBoth dimensions agree.
MultiplyInner dimensions match. The outer dimensions give the result size.
Find a 2×2 determinantad−bc
Invert a 2×2 matrix1ad−bc(d−b−ca), with ad−bc≠0
Solve AX=BX=A−1B, when A is invertible
Apply two transformationsWith column vectors, the rightmost matrix acts first.
Predict a statesn=Tns0

Nine practice problems

Write the dimensions or operation before you calculate. Open each solution to check your work.

  1. Find the dimensions and the entry a23 of the matrix below.

    A=(1−27034)
    Show solution 1

    There are two rows and three columns, so it is 2×3. Row two, column three is 4.

  2. Find 2P−Q for these matrices.

    P=(2−103)Q=(142−2)
    Show solution 2

    Double P, then subtract by position.

    2P−Q=(3−6−28)
  3. Compute UV and decide whether VU is defined.

    U=(2−13) V=(1042−15)
    Show solution 3

    The product is 1×2. Compute 2−4−3=−5 and 0−2+15=13, giving UV=(−513). For VU, the inner dimensions are 2 and 1, so that order is undefined.

  4. Find the area spanned by the two columns of (2134).

    Show solution 4

    The determinant is 2·4−1·3=5. Its absolute value gives 5 square units.

  5. Find the inverse of A=(2112).

    Show solution 5

    The determinant is 4−1=3. Swap the diagonal entries, change the off-diagonal signs and scale by 13.

    A−1=13(2−1−12)
  6. Solve the system 3x+y=9 and x+y=5 using an inverse.

    Show solution 6

    The coefficient determinant is 2.

    A−1=12(1−1−13)

    Multiplying the constants column gives x=2, y=3. Substitution gives 9 and 5 in the two equations.

  7. Reflect (1,4) across the y-axis, then rotate 90∘ counterclockwise.

    Show solution 7

    The reflection gives (−1,4). The rotation sends that point to (−4,−1). With column vectors, the reflection matrix is on the right in the product.

  8. Use the study-room transition matrix above. Starting with 100 in A and 50 in B, find the next state and the steady state.

    Show solution 8

    At the next step the counts are 0.80(100)+0.10(50)=85 and 0.20(100)+0.90(50)=65. The steady state is 50 in A and 100 in B, since the rates and total are the same as in the worked example.

  9. For what value of t is (2t63) singular?

    Show solution 9

    The determinant is 6−6t. Set it equal to zero to get t=1. The columns are then (26) and (13), so one is twice the other.

Course framework and related exam practice

Use the College Board framework and the exercises here for the matrix topics in Unit 4. For assessed work on related function ideas, 2026 Free-Response Question 1 asks you to evaluate a composition and justify invertibility from a graph.

Want to check your matrix setup or work through a transformation? A NUM8ERS tutor can help with your class examples.

Book Free Consultation

Lesson by NUM8ERS.