AP Precalculus: Matrices
Matrices can model a system that changes between a finite number of states at regular times, such as a customer who is subscribed or not subscribed each month. If the next state depends only on the current state, the process is a Markov chain. Its transition matrix P has entries pij = the probability of moving from state j to state i. Column j lists where you go from state j, so each column adds to 1; a matrix with that property is a Markov matrix. A state vector x(n) is a column whose i-th entry is the probability of being in state i at observation n; its entries are nonnegative and sum to 1. The key rule is x(n+1) = P·x(n), so x(n) = Pnx(0). Repeating the multiplication (a calculator makes this fast) reveals the steady state, a distribution that no longer changes from one step to the next. You can also look backward: since x(n) = Px(n−1), multiplying by P−1 gives x(n−1) = P−1x(n), which predicts an earlier state. Always label the rows and columns so you can tell from-state and to-state apart.
1. Matrices: Order, Elements, and Equality
A matrix is a rectangular array of numbers arranged in rows (horizontal) and columns (vertical). The numbers are its elements or entries. Matrices are everywhere: a calendar is a matrix with weeks as rows and days as columns, and a recipe card is a matrix with ingredients as rows and amounts as a column. The order (or size) of a matrix is rows × columns, read “m by n.” A matrix with one column is a column matrix (column vector), one with one row is a row matrix (row vector), and one with the same number of rows and columns is a square matrix. To name an element, always give the row first, then the column: the entry in row 2, column 3 of A is written a23. Two matrices are equal only if they have the same order and every pair of corresponding entries is equal, which turns one matrix equation into one ordinary equation for each position.
Worked Example: Let A = 2−15034−27168−3. State its order, find a23 and a32, and then solve x + 132y = 5z2−4 for x, y, z.
A has 3 rows and 4 columns, so its order is 3 × 4. The entry in row 2, column 3 is a23 = −2. Then a32 is row 3, column 2, which is 6. Note a23 ≠ a32: the order of the subscripts matters.
For the equality, both sides are 2 × 2, so match positions: x + 1 = 5 gives x = 4, z = 3, and y = −4. The entries 3 and 2 appear on both sides in matching places.
order 3 × 4, a23 = −2, x = 4, y = −4, z = 3
1. What is the order of 401273?
Explanation: There are 2 rows and 3 columns, so the order is 2 × 3 (rows first). It is not a square matrix.
2. In 1−46902, what is the entry in row 2, column 1?
Explanation: Row 2 is [6 9] and column 1 of that row is 6. Always count down to the row first and then across to the column.
3. Which describes 38−15?
Explanation: It has 4 rows and 1 column, so it is a 4 × 1 column matrix (also called a column vector).
4. If a25b = 725−3, what are a and b?
Explanation: Equal matrices have equal entries in matching positions, so a = 7 and b = −3.
5. Can 1234 equal 120340?
Explanation: Matrices are equal only when they have the same order and all corresponding entries match. A 2 × 2 matrix can never equal a 2 × 3 matrix.
2. Adding and Subtracting Matrices, and Scalar Multiples
Matrices of the same order are added or subtracted by combining corresponding entries: (A + B)ij = aij + bij, and likewise for subtraction. If the orders differ, the sum or difference is not defined. Addition is commutative (A + B = B + A) and associative, and the zero matrix, with every entry 0, is the additive identity. A scalar multiple kA multiplies every entry of A by the number k, so 3A triples each entry and −A changes every sign. These rules let you solve simple matrix equations just as you would solve x + 5 = 9: to solve X + A = B, subtract A from both sides to get X = B − A. Check the orders before you start, and watch the signs when you subtract a negative entry.
Worked Example: Let A = 3−2510−4 and B = −1627−33. Find A + B, A − B, and 2A.
Both are 2 × 3, so the operations are defined. A + B = 2478−3−1. A − B = 4−83−63−7 (for example 3 − (−1) = 4 and 0 − (−3) = 3). Finally 2A = 6−41020−8.
If we tried A + C with C a 3 × 2 matrix, the sum would not exist, because the orders are different.
1. Find 4−126 + −350−2.
Explanation: Add each pair of corresponding entries: 4 + (−3) = 1, −1 + 5 = 4, 2 + 0 = 2, 6 + (−2) = 4.
2. Which sum is defined?
Explanation: Addition requires exactly the same order. Only the first pair has matching orders; a 2 × 3 and a 3 × 2 do not match even though they have the same number of entries.
3. Find 72−15 − 3−465.
Explanation: Subtract corresponding entries: 7 − 3 = 4, 2 − (−4) = 6, −1 − 6 = −7, 5 − 5 = 0.
4. Solve for X: X + 1234 = 6509.
Explanation: X = B − A = 53−35. Subtract entry by entry, being careful with 0 − 3 = −3.
5. Find 31−204.
Explanation: A scalar multiple multiplies every entry by 3, including the 0 and the 4.
3. Matrix Multiplication
The product AB is defined only when the number of columns of A equals the number of rows of B. If A is m × n and B is n × p, then AB is m × p: the inner numbers must match and the outer numbers give the order of the answer. To find the entry in row i, column j of AB, take row i of A and column j of B, multiply the pairs in order, and add: (AB)ij = ai1b1j + ai2b2j + …. Think “across, then down.” Matrix multiplication is not commutative: AB and BA can have different orders, and even when both are defined they usually have different entries. It is associative, (AB)C = A(BC), and distributes over addition, A(B + C) = AB + AC. A matrix times a column vector gives a column vector, which is the main use in the later sections. Always write down the orders first: if the inner numbers do not match, stop, because the product does not exist.
Worked Example: Let A = 1203−14 (2 × 3) and B = 210−352 (3 × 2). Find AB and BA.
The inner numbers are 3 and 3, so AB exists and is 2 × 2. Entry (1, 1): 1·2 + 2·0 + 0·5 = 2. Entry (1, 2): 1·1 + 2·(−3) + 0·2 = −5. Entry (2, 1): 3·2 + (−1)·0 + 4·5 = 26. Entry (2, 2): 3·1 + (−1)(−3) + 4·2 = 14. So AB = 2−52614.
BA is also defined, but it is 3 × 3: BA = 534−93−121188. The two products do not even have the same order, so AB ≠ BA.
AB is 2 × 2, BA is 3 × 3
1. A is 2 × 3 and B is 3 × 4. What is the order of AB?
Explanation: The inner numbers (3 and 3) match, and the outer numbers give the order: 2 × 4.
2. A is 3 × 2 and B is 3 × 2. Which statement is true?
Explanation: A has 2 columns but B has 3 rows, so the inner numbers do not match and AB does not exist. (BA does not exist either.)
3. Find 2103145−2.
Explanation: Row by column: 2·1 + 1·5 = 7, 2·4 + 1·(−2) = 6, 0·1 + 3·5 = 15, 0·4 + 3·(−2) = −6. The second option multiplies entries directly (not matrix multiplication), and the third is BA.
4. For 1201 and 3011, is AB = BA?
Explanation: Compute both: AB has first row [5, 2] and BA has first row [3, 6]. Matrix multiplication is not commutative in general.
5. Find 2−13452.
Explanation: Row 1: 2·5 + (−1)(2) = 8. Row 2: 3·5 + 4·2 = 23. The result is a 2 × 1 column matrix.
4. The Identity Matrix and Inverse Matrices
The identity matrix I is the square matrix with 1s along the main diagonal (top left to bottom right) and 0s everywhere else, for example 1001 and 100010001. It plays the role of the number 1: for any square matrix A of the same order, AI = IA = A. An n × n matrix A is invertible if there is an n × n matrix B with AB = BA = I. That matrix B is the inverse of A, written A−1. Not every matrix has an inverse, and only square matrices can. To verify that two matrices are inverses, multiply them and check that the product is I; because multiplication is not commutative in general, it is good practice to check both orders (for square matrices one order implies the other). Be careful with notation: A−1 does not mean 1/A or the matrix of reciprocals of the entries.
Worked Example: Verify that B = 2−1−53 is the inverse of A = 3152.
AB = 1001 and BA = 1001. For example the (1, 1) entry of AB is 3(2) + 1(−5) = 1 and the (1, 2) entry is 3(−1) + 1(3) = 0. Both products equal I, so B = A−1.
1. What is 47121001?
Explanation: Multiplying by the identity leaves a matrix unchanged: AI = A.
2. Which is the identity matrix of order 3?
Explanation: The identity has 1s on the main diagonal and 0s elsewhere. The second has all 1s, the third has the 1s on the other diagonal, and the last has a 0 on the diagonal.
3. Which matrix is the inverse of 1235?
Explanation: Check by multiplying: 1235−523−1 = 1001. The product is I, so this is the inverse.
4. If AB = I for square matrices A and B, then B is called
Explanation: By definition, when AB = BA = I the matrix B is the inverse of A, written A−1.
5. Can a 2 × 3 matrix have an inverse?
Explanation: An inverse must satisfy AB = BA = I, which forces A to be square. A 2 × 3 matrix has no inverse.
5. Finding an Inverse: Systems, the Determinant Formula, and Technology
There are three ways to find A−1 for a 2 × 2 matrix. Method 1: system of equations. Let A−1 = wxyz and use AA−1 = I. Multiplying gives four equations that split into two small systems (one for the first column, w and y, and one for the second column, x and z), which you solve by elimination or substitution. Method 2: the determinant formula. For A = abcd, the determinant is det(A) = ad − bc. If det(A) ≠ 0, then A−1 = 1det(A) d−b−ca. In words: swap the two diagonal entries, change the sign of the other two, and divide everything by the determinant. Method 3: technology. On a graphing calculator, enter the matrix in the matrix editor (2nd, x−1, EDIT), set its dimensions, then return to the home screen, select [A], press x−1 and ENTER; use the MATH menu to convert decimals to fractions. The key fact is that a square matrix is invertible if and only if det(A) ≠ 0. If det(A) = 0, the matrix is called singular and has no inverse.
Worked Example: Find the inverse of A = 3412 by two methods.
Method 1. Set 3412wxyz = I. The first column gives 3w + 4y = 1 and w + 2y = 0. From the second, w = −2y; then −6y + 4y = 1, so y = −1/2 and w = 1. The second column gives 3x + 4z = 0 and x + 2z = 1, so x = 1 − 2z and 3 − 6z + 4z = 0, so z = 3/2 and x = −2.
Method 2. det(A) = (3)(2) − (4)(1) = 2, which is not 0. So A−1 = 122−4−13 = 1−2−1232. Both methods agree.
A−1 = 1−2−1232
1. Find the determinant of 6−245.
Explanation: det = ad − bc = (6)(5) − (−2)(4) = 30 + 8 = 38. The minus sign in front of bc becomes plus because bc is negative.
2. Find the inverse of 2513.
Explanation: det = 6 − 5 = 1. Swap the diagonal entries and negate the others: 3−5−12.
3. Which matrix has no inverse?
Explanation: det2436 = 12 − 12 = 0, so it is singular (the rows are proportional). The other determinants are −2, 1 and −1.
4. For what value of k is k623 not invertible?
Explanation: Set the determinant equal to 0: 3k − 12 = 0, so k = 4.
5. Find the inverse of 4162.
Explanation: det = 8 − 6 = 2, so A−1 = 122−1−64 = 1−12−32. The second option forgets to divide by the determinant.
6. The Determinant and the Area of a Parallelogram
Matrices are a handy tool for vectors. Take two vectors v1 = 〈a, c〉 and v2 = 〈b, d〉 drawn from the origin. Together they form two sides of a parallelogram, and the fourth vertex is the head of v1 + v2. Put the vectors as the two columns of A = abcd. Then the area of the parallelogram equals |det(A)|, the absolute value of ad − bc. The absolute value is needed because the determinant can be negative (it depends on the order of the vectors) but an area cannot. It works equally well if the vectors are written as rows. If det(A) = 0 the area is zero, which means the two vectors lie on the same line, so they are parallel and the “parallelogram” is flat. When a parallelogram is given by its vertices rather than vectors, pick one vertex, form the two vectors that go from it to the two adjacent vertices (head minus tail), and take the determinant of those. A graph of the points first helps you pick the adjacent vertices.
Worked Example: Find the area of the parallelogram with vertices C(0, 0), A(5, 1), B(7, 5) and Y(2, 4).
The two sides from C are CA = 〈5 − 0, 1 − 0〉 = 〈5, 1〉 and CY = 〈2, 4〉. Form the matrix with these as columns: 5214. Then |det| = |(5)(4) − (2)(1)| = |20 − 2| = 18 square units.
Now suppose a parallelogram has the three vertices (1, 2), (4, 3), (2, 7), with (1, 2) adjacent to both of the others. Starting at (1, 2): 〈3, 1〉 and 〈1, 5〉. Then |det| = |15 − 1| = 14 square units.
1. Find the area of the parallelogram spanned by 〈4, 1〉 and 〈−2, 5〉.
Explanation: det 4−215 = (4)(5) − (−2)(1) = 22. The area is |22| = 22 square units.
2. Two vectors have det = −12 when placed in a matrix. What is the area of the parallelogram they span?
Explanation: Area = |det| = |−12| = 12. The negative sign only reflects the order of the vectors.
3. The vectors 〈2, 6〉 and 〈1, 3〉 form a parallelogram with area
Explanation: det 2163 = 6 − 6 = 0. A zero determinant means the vectors are parallel (one is a multiple of the other), so no area is enclosed.
4. Find the area of the parallelogram with vertices (0, 0), (3, 1), (4, 5), and (1, 4).
Explanation: The sides from the origin are 〈3, 1〉 and 〈1, 4〉. det = (3)(4) − (1)(1) = 11. Check: (4, 5) = (3, 1) + (1, 4), so the vertices do form a parallelogram.
5. A parallelogram has adjacent sides 〈6, 0〉 and 〈2, 5〉. Its area is
Explanation: det 6205 = 30 − 0 = 30, which matches base 6 times height 5.
7. Functions from Rn to Rm and Linear Transformations
A function f from the real numbers to the real numbers sends a number to a number. Now we allow the inputs and outputs to be ordered pairs, triples, or n-tuples. The set of all ordered n-tuples (x1, x2, …, xn) of real numbers is n-space, written Rn. A point (a1, a2) in R2 can be read two ways: as a point with those coordinates, or as a vector with those components. A rule that takes each element of Rn to an element of Rm is a transformation (or map) T: Rn → Rm. It can be defined by m formulas, w1 = f1(x1, …, xn), …, wm = fm(x1, …, xn), and the output is the image of the input. If m = n it is called an operator. A transformation is linear when every output formula is a sum of constant multiples of the inputs, such as w = 3x − 2y + z. Squares, products of variables (xy), and added constants (x + 1) make it nonlinear. A linear transformation always sends the zero vector to the zero vector.
Worked Example: The transformation T: R2 → R3 is defined by w1 = x1 − x2, w2 = 2x1x2, w3 = x1² + x2. Find the image of (2, −1). Is T linear?
Substitute x1 = 2, x2 = −1: w1 = 2 − (−1) = 3, w2 = 2(2)(−1) = −4, w3 = 4 + (−1) = 3. So T(2, −1) = (3, −4, 3).
T is not linear: w2 contains the product x1x2 and w3 contains x1². A quick test: T(0, 0) = (0, 0, 0), which does not rule it out, so check the formulas themselves.
1. T(x, y) = (x + 2y, 3x − y). What is T(1, 4)?
Explanation: x + 2y = 1 + 8 = 9 and 3x − y = 3 − 4 = −1, so T(1, 4) = (9, −1).
2. Which transformation is linear?
Explanation: Each output must be a sum of constant multiples of x and y. Adding 1, multiplying variables, and squaring all break linearity.
3. A linear transformation always sends (0, 0) to
Explanation: Every output is a sum of constant multiples of the inputs, so zero inputs give zero outputs. The zero vector always maps to the zero vector.
4. T: R3 → R2 is defined by T(x, y, z) = (x − z, 3x + y + 2z). What is T(1, 2, 3)?
Explanation: x − z = 1 − 3 = −2 and 3x + y + 2z = 3 + 2 + 6 = 11.
5. A transformation T: R4 → R3 is a map from
Explanation: The notation T: Rn → Rm means inputs have n coordinates and outputs have m. Here the inputs are ordered 4-tuples and the outputs are ordered triples.
8. The Standard Matrix and Matrix-Vector Multiplication
Every matrix defines a linear transformation, and every linear transformation comes from a matrix. If A is m × n, then T(x) = Ax is a linear transformation from Rn to Rm, where x is written as a column. For example, multiplying 10−1312 by the column (x, y, z) gives (x − z, 3x + y + 2z), a map from R3 to R2. To go the other way, from formulas to the standard matrix, you can read the coefficients off row by row, but there is a faster trick: the columns of the standard matrix are the images of the unit vectors. In R2, the first column is T(1, 0) and the second is T(0, 1). In general, column j is T(ej), where ej has a 1 in position j and 0 elsewhere. That is why the unit vectors i and j are so useful: if you know where they land, you know where everything lands, since (x, y) = x·i + y·j and T(x, y) = x·T(i) + y·T(j). The matrix of an m-output, n-input transformation is m × n, so check that the number of rows equals the number of outputs.
Worked Example: Find the standard matrix of T(x, y) = (2x − y, x + 3y), then use it to find T(4, 1).
Evaluate on the unit vectors. T(1, 0) = (2, 1) is the first column; T(0, 1) = (−1, 3) is the second. So A = 2−113.
Then T(4, 1) = 2−11341 = 77, which matches the formula: 2(4) − 1 = 7 and 4 + 3 = 7.
A = 2−113, T(4, 1) = (7, 7)
1. Find the standard matrix of f(x, y) = (x + 3y, 2x, y − x).
Explanation: f(1, 0) = (1, 2, −1) is column 1 and f(0, 1) = (3, 0, 1) is column 2. The matrix is 3 × 2 (three outputs, two inputs); the second option is the transpose.
2. The standard matrix of a map from R4 to R3 has order
Explanation: There are 3 outputs (rows) and 4 inputs (columns), so the matrix is 3 × 4.
3. Let A = 10−1312. Find A applied to (2, 1, 3).
Explanation: First entry: 1(2) + 0(1) + (−1)(3) = −1. Second entry: 3(2) + 1(1) + 2(3) = 13. The output is the vector (−1, 13).
4. T(1, 0) = (3, −2) and T(0, 1) = (4, 5). What is T(2, 3)?
Explanation: T(2, 3) = 2T(1, 0) + 3T(0, 1) = (6, −4) + (12, 15) = (18, 11). The standard matrix is 34−25.
5. Which must be true for the linear transformation T(x) = Ax with A a 2 × 3 matrix?
Explanation: Ax is defined when x has 3 entries (the number of columns), and the result has 2 entries (the number of rows).
9. Rotation Operators
A rotation operator on R2 turns every vector counterclockwise about the origin through a fixed angle θ and does not change its length. Its standard matrix comes from the unit-vector trick: i = (1, 0) rotates to (cos θ, sin θ) and j = (0, 1) rotates to (−sin θ, cos θ), so R(θ) = cos θ−sin θsin θcos θ. The image of (x, y) is therefore (x cos θ − y sin θ, x sin θ + y cos θ). A positive angle rotates counterclockwise and a negative angle rotates clockwise. Common matrices: for θ = 90°, R = 0−110; for θ = 180°, R = −100−1, which just negates both coordinates. Because rotation is a rigid motion, its determinant is cos²θ + sin²θ = 1, so areas are preserved. Use exact values for special angles (30°, 45°, 60°, 90°) and keep your calculator in the right angle mode.
Worked Example: Rotate v = (2, 0) counterclockwise through 60°. Then rotate (3, 1) through 90°.
With θ = 60°, cos θ = 1/2 and sin θ = √3/2. The image is 1/2−√3/2√3/21/220 = (1, √3), which has length √(1 + 3) = 2, the same as v.
For 90° use 0−110: 0−11031 = −13. So (3, 1) goes to (−1, 3).
1. Rotate (4, 0) counterclockwise by 90°.
Explanation: The 90° matrix sends (x, y) to (−y, x). So (4, 0) goes to (0, 4).
2. What is the image of (1, 1) under a rotation of 180°?
Explanation: A 180° rotation negates both coordinates: (x, y) goes to (−x, −y).
3. Rotating (√2, 0) counterclockwise by 45° gives
Explanation: (√2 cos 45°, √2 sin 45°) = (√2 · √2/2, √2 · √2/2) = (1, 1).
4. Which matrix rotates vectors counterclockwise by 90°?
Explanation: R(90°) = cos 90°−sin 90°sin 90°cos 90° = 0−110. The second option rotates clockwise.
5. What is the determinant of any rotation matrix?
Explanation: det = cos²θ + sin²θ = 1, so a rotation never changes areas.
10. Dilations and the Determinant
A transformation T(x) = Ax from R2 to R2 maps the plane to itself, and the determinant of A describes how it changes area. The unit square, with corners (0, 0), (1, 0), (1, 1), (0, 1), is the parallelogram spanned by the unit vectors i and j, and its area is 1. After the transformation it becomes the parallelogram spanned by T(i) and T(j), which are the columns of A. By the previous section, the area of that parallelogram is |det(A)|. This holds for every region, not just squares: |det(A)| is the factor by which T multiplies the area of any region. If |det(A)| > 1 the map stretches areas (an expansion or dilation); if 0 < |det(A)| < 1 it shrinks them; if det(A) < 0 the orientation is flipped as well; and if det(A) = 0 the whole plane is collapsed onto a line or a point, so the map has no inverse. A pure scaling by k in both directions has matrix k00k and det = k², so it multiplies area by k² and lengths by |k|.
Worked Example: Under T(x) = Ax with A = 2103, what happens to the unit square, and by what factor are areas multiplied?
The images of the unit vectors are T(i) = (2, 0) and T(j) = (1, 3). The corner (1, 1) goes to 210311 = (3, 3). So the unit square becomes the parallelogram with vertices (0, 0), (2, 0), (3, 3), (1, 3).
The area scale factor is |det A| = |(2)(3) − (1)(0)| = 6, so a region of area 5 would be mapped to a region of area 30.
1. Find the area scale factor for A = 3−124.
Explanation: det = (3)(4) − (−1)(2) = 12 + 2 = 14. The factor is |14| = 14.
2. What area does the unit square have after the transformation with matrix −200−2?
Explanation: det = (−2)(−2) − 0 = 4, so the unit square becomes a square of side 2 and area 4. (It is also rotated by 180°.)
3. A region of area 5 is transformed by a matrix with determinant −3. The new area is
Explanation: Area is multiplied by |det| = 3: 5 × 3 = 15. The negative sign flips orientation but areas are never negative.
4. A transformation scales every length by a factor of 3 (matrix 3003). By what factor does it multiply areas?
Explanation: det = 9. Lengths grow by 3 in both directions, so areas grow by 3 × 3 = 9.
5. If det(A) = 0, the transformation T(x) = Ax
Explanation: The columns of A are parallel (or zero), so every image lies on a line through the origin and the area of any image is 0.
11. Compositions and Inverses of Linear Transformations
If TA: Rn → Rk and TB: Rk → Rm are linear transformations, you can apply TA first and then TB. This composition is written (TB ∘ TA)(x) = TB(TA(x)) = B(Ax) = (BA)x. Two big facts follow: (1) the composition of two linear transformations is a linear transformation, and (2) its matrix is the product BA, with the matrix of the second (outer) transformation on the left. Because matrix multiplication is not commutative, the order of the transformations matters. The inverse of a linear transformation undoes it. For a square matrix A, the following are equivalent: A is invertible; det(A) ≠ 0; the range of TA is all of Rn; and TA is one-to-one (different inputs give different outputs). In that case TA−1 is multiplication by A−1, and TA−1(TA(x)) = A−1Ax = x: applying the transformation and then its inverse brings you back to the start. To find a formula for the inverse, write the standard matrix, invert it, and multiply by (w1, w2).
Worked Example: Let T have matrix 1201 and S have matrix 3012. Find the matrices of S ∘ T and T ∘ S. Then show that U(x, y) = (2x + y, 3x + 2y) is one-to-one and find U−1.
S ∘ T means T first, then S, so the matrix is (matrix of S)(matrix of T), in that order: 30121201 = 3614. The other order gives T ∘ S: 12013012 = 5412. They are different.
U has standard matrix 2132 with det = 4 − 3 = 1 ≠ 0, so U is one-to-one. Its inverse matrix is 2−1−32, so U−1(w1, w2) = (2w1 − w2, −3w1 + 2w2).
1. T has matrix 1101 and S has matrix 2003. What is the matrix of S ∘ T (T first, then S)?
Explanation: The matrix of S ∘ T is (matrix of S)(matrix of T) = 2203. The second option is T ∘ S.
2. Is the composition of two linear transformations linear?
Explanation: (TB ∘ TA)(x) = B(Ax) = (BA)x, which is multiplication by the matrix BA.
3. T(x, y) = (2x + y, x + y). Find T−1(w1, w2).
Explanation: The matrix is 2111 with det 1, so the inverse is 1−1−12. Therefore T−1(w1, w2) = (w1 − w2, −w1 + 2w2).
4. Is T(x, y) = (2x + 6y, x + 3y) one-to-one?
Explanation: det 2613 = 6 − 6 = 0, so the matrix is not invertible and the transformation is not one-to-one (for example (6, 0) and (0, 2) both map to (12, 6)).
5. If T is one-to-one with inverse T−1, then T−1(T(x)) equals
Explanation: The inverse cancels the effect of T: A−1Ax = Ix = x.
12. Matrices Modeling Contexts: Markov Chains
Matrices can model a system that changes between a finite number of states at regular times, such as a customer who is subscribed or not subscribed each month. If the next state depends only on the current state, the process is a Markov chain. Its transition matrix P has entries pij = the probability of moving from state j to state i. Column j lists where you go from state j, so each column adds to 1; a matrix with that property is a Markov matrix. A state vector x(n) is a column whose i-th entry is the probability of being in state i at observation n; its entries are nonnegative and sum to 1. The key rule is x(n+1) = P·x(n), so x(n) = Pnx(0). Repeating the multiplication (a calculator makes this fast) reveals the steady state, a distribution that no longer changes from one step to the next. You can also look backward: since x(n) = Px(n−1), multiplying by P−1 gives x(n−1) = P−1x(n), which predicts an earlier state. Always label the rows and columns so you can tell from-state and to-state apart.
Worked Example: A streaming service finds that 90% of subscribers stay subscribed the next month, and 20% of non-subscribers subscribe the next month. State 1 is subscribed and state 2 is not. (a) Build the transition matrix. (b) For a person who is not subscribed now, find the state vectors for the next 3 months. (c) Go back one month from the third.
(a) Column 1 (from subscribed): stays 0.9, leaves 0.1. Column 2 (from not subscribed): joins 0.2, stays out 0.8. So P = 0.90.20.10.8 (each column sums to 1).
(b) x(0) = 01. Then x(1) = Px(0) = 0.20.8, x(2) = 0.340.66, x(3) = 0.4380.562. After 3 months the person is subscribed with probability 0.438.
(c) det(P) = 0.72 − 0.02 = 0.7 and P−1 = 10.70.8−0.2−0.10.9. Then P−1x(3) = 0.340.66, which is x(2) as expected. Continued multiplication shows the vectors approach (2/3, 1/3), the steady state.
1. In a transition matrix, which statement about the columns is true?
Explanation: Column j lists the probabilities of moving from state j to every state, so the entries in each column must add to 1 (some state is always reached).
2. P = 0.50.20.10.30.60.20.20.20.7. What is the probability of moving from state 2 to state 3?
Explanation: The entry p32 (row 3, column 2) is the probability of moving from state 2 to state 3, which is 0.2.
3. With P = 0.90.20.10.8 and x(0) = 10, what is x(1)?
Explanation: x(1) = Px(0) picks out column 1 of P: 0.90.1. It sums to 1, as every state vector must.
4. Which could be a state vector for a Markov chain with 3 states?
Explanation: Entries must be nonnegative and add to 1. Only the first option does.
5. A Markov chain’s state vectors settle at 0.60.4 after many steps. This vector is called
Explanation: A distribution that no longer changes from step to step is the steady state: P times it equals itself.
Common Mistakes to Avoid
- Reversing the order when naming matrix elements. The entry a23 is in row 2, column 3, never column 2, row 3.
- Trying to add or subtract matrices of different orders. The orders must be exactly the same; multiplication has a different rule.
- Multiplying matrices entry by entry. Matrix multiplication takes row times column sums, and the inner dimensions must match.
- Assuming AB = BA. Matrix multiplication is not commutative, and in a composition the matrix of the second transformation goes on the left.
- Writing the inverse of abcd with the wrong signs or forgetting to divide by the determinant. Swap a and d, negate b and c, then divide by ad − bc.
- Forgetting that A−1 exists only when det(A) ≠ 0, and using the determinant (not its absolute value) as an area.
- Building a standard matrix with the images of i and j as rows. They are the columns.
- In a Markov chain, filling the transition matrix by rows instead of columns. Each column is a from-state and must add to 1.
Frequently Asked Questions
What is the order of a matrix?
It is the number of rows by the number of columns, written m × n. A matrix with 3 rows and 2 columns is a 3 × 2 matrix, and the rows always come first.
When can two matrices be multiplied?
The number of columns of the first matrix must equal the number of rows of the second. An m × n matrix times an n × p matrix gives an m × p matrix.
How do I find the inverse of a 2 × 2 matrix?
Compute the determinant ad − bc. If it is not 0, swap a and d, change the signs of b and c, and multiply by 1/(ad − bc). You can check by multiplying the matrix by your answer to get the identity.
Why does the determinant give the area of a parallelogram?
The columns of the matrix are the vectors that form two adjacent sides, and the absolute value of ad − bc equals base times height for that parallelogram. A determinant of 0 means the vectors are parallel.
How do I find the matrix of a linear transformation?
Apply the transformation to i = (1, 0) and j = (0, 1). The results are the first and second columns of the standard matrix.
What does a Markov chain transition matrix tell me?
Each entry is the probability of moving from one state (its column) to another state (its row). Multiplying the matrix by a state vector gives the probabilities for the next time step.
Is this topic on the AP Precalculus exam?
The chapter notes that these matrix topics are not assessed on the AP exam, but they may be part of your school’s curriculum and they connect directly to vectors and parametric functions.
Where can I practice more problems like these?
The Parametric Functions, Vectors, and Matrices module in the AP Precalculus QBank gives you more practice on this topic, and you can browse every other topic in the full AP Precalculus QBank.