Matrices AI HL

Matrices store a table of numbers so that one calculation handles many quantities at once. The page starts with the rules for adding and multiplying matrices, then uses the determinant and the inverse to undo a matrix and to solve a system of equations, and finishes with eigenvalues and eigenvectors of 2×22\times2 matrices. In an exam the set-up is yours and the arithmetic is the calculator's: enter the matrices, choose the operation, and write down what you entered and what you read.

Formulas at a glance

The determinant and inverse of a 2×22\times2 matrix and the formula for a power of a matrix are in the formula booklet. The rule for when a product exists, the solution of a system, and the characteristic equation are not, so learn them.

Determinant of A=(abcd)A=\begin{pmatrix}a&b\\ c&d\end{pmatrix}

detA=ad−bc\det A=ad-bc

In the booklet

Inverse of a 2 by 2 matrix

A−1=1detA(d−b−ca)A^{-1}=\dfrac{1}{\det A}\begin{pmatrix}d&-b\\ -c&a\end{pmatrix}

In the booklet

Product of two matrices

An m×nm\times n matrix times an n×pn\times p matrix is an m×pm\times p matrix

Not in the booklet

Solving a system of equations

Ax=b ⇒ x=A−1bA\mathbf{x}=\mathbf{b}\ \Rightarrow\ \mathbf{x}=A^{-1}\mathbf{b}

Not in the booklet

Characteristic equation, for the eigenvalues

det(A−λI)=0\det(A-\lambda I)=0

Not in the booklet

Eigenvector for a given eigenvalue

(A−λI)v=0(A-\lambda I)\mathbf{v}=\mathbf{0}

Not in the booklet

Power of a matrix, by diagonalisation

Mn=PDnP−1M^n=PD^nP^{-1}

In the booklet

Which method to use

Decide what the question gives you and what it wants, then check the order of the matrices before entering anything on the calculator.

The question hasUseNotes
Two matrices to multiply, such as a table of quantities and a column of pricesCheck that the columns of the first equal the rows of the second, then multiply on the calculatorThe order of the product is rows of the first by columns of the second, and ABAB is usually not BABA
A sum, a difference or a scalar multiple of matricesAdd or subtract entry by entry, or multiply every entry by the scalarAddition and subtraction need matrices of the same order
The determinant, a test for an inverse, or the area scale factor of a transformationdetA=ad−bc\det A=ad-bc for a 2×22\times2 matrix, or the determinant command for larger matricesA determinant of 00 means there is no inverse. The size of the determinant is the area scale factor
The inverse of a matrixThe 2×22\times2 formula by hand, or the inverse key on the calculatorDivide by the determinant. Check by multiplying: the product is II
Two or three linear equations, or a matrix times an unknown vector equal to a known vectorWrite Ax=bA\mathbf{x}=\mathbf{b}, then x=A−1b\mathbf{x}=A^{-1}\mathbf{b} or the equation solverThe inverse goes on the left of b\mathbf{b}. State what each unknown stands for
The eigenvalues of a 2×22\times2 matrixSolve det(A−λI)=0\det(A-\lambda I)=0, with the polynomial solver or the eigenvalue commandThe equation is λ2−(trace)λ+detA=0\lambda^2-(\text{trace})\lambda+\det A=0. A diagonal matrix has its diagonal entries as eigenvalues
An eigenvector for a given eigenvalueSolve (A−λI)v=0(A-\lambda I)\mathbf{v}=\mathbf{0}The two rows are multiples of each other, so use one row. Any non-zero multiple is also an eigenvector
A high power of a 2×22\times2 matrix with distinct real eigenvaluesMn=PDnP−1M^n=PD^nP^{-1}, with the eigenvectors as the columns of PPRaise each diagonal entry of DD to the power nn

Section 1 of 4 AHL1.14

Matrix operations

Matrices of the same order can be added or subtracted entry by entry, and any matrix can be multiplied by a scalar. Two matrices can be multiplied only when the number of columns in the first equals the number of rows in the second, and the order matters because ABAB and BABA usually differ. It also covers order, elements and the identity matrix.

Matrix multiplication

Matrix multiplication

Only defined when the number of columns in the first matrix equals the number of rows in the second. Associative and distributive, but AB≠BAAB\neq BA in general - the order you multiply in matters.

Not in the formula booklet - definition

Key terms

What is the order of a matrix?

The order of a matrix is written m×nm\times n, where mm is the number of rows and nn is the number of columns. Rows are always counted first.

e.g. (123456)\begin{pmatrix}1&2\\ 3&4\\ 5&6\end{pmatrix} has order 3×23\times2.

What is an element of a matrix?

An element is a single entry in the matrix. The element in row ii and column jj of AA is written aija_{ij}.

e.g. In (7294)\begin{pmatrix}7&2\\9&4\end{pmatrix}, the element in row 22, column 11 is 99.

What is the identity matrix?

The identity matrix II is a square matrix with 11 on the leading diagonal and 00 elsewhere. Multiplying by it leaves a matrix unchanged, so IA=AI=AIA=AI=A.

e.g. (1001)(3528)=(3528)\begin{pmatrix}1&0\\0&1\end{pmatrix}\begin{pmatrix}3&5\\2&8\end{pmatrix}=\begin{pmatrix}3&5\\2&8\end{pmatrix}.

How do you multiply a matrix by a scalar?

Multiply every element of the matrix by the scalar. The order of the matrix does not change.

e.g. 3(2−104)=(6−3012)3\begin{pmatrix}2&-1\\0&4\end{pmatrix}=\begin{pmatrix}6&-3\\0&12\end{pmatrix}.

Worked example, step by step

The question Calculator needed [5 marks]

Three cafes sell coffee and tea. Matrix QQ shows the number of each drink sold in one day, with one row for each cafe (A, B, C) and one column for each drink (coffee, tea): Q=(403025503520).Q=\begin{pmatrix}40&30\\ 25&50\\ 35&20\end{pmatrix}. The prices in pounds of the two drinks are given by p=(2.501.80).p=\begin{pmatrix}2.50\\ 1.80\end{pmatrix}.
(a) Write down the order of QQ.

(b) Find the matrix QpQp.

(c) Both prices rise by 10%. Find each cafe's daily takings after the rise, assuming the sales do not change.

Worked solution: worked example

Answer: (a) 3×23\times2 (b) (154152.5123.5)\begin{pmatrix}154\\ 152.5\\ 123.5\end{pmatrix} (c) £169.40, £167.75 and £135.85 for cafes A, B and C

Step 1 - Write down the order.

QQ has 3 rows and 2 columns, so its order is 3×23\times2. A1 - 3×23\times2

Why? The order is always written rows first, then columns.

Step 2 - Check that the product exists.

pp has order 2×12\times1. The number of columns of QQ is 2 and the number of rows of pp is 2, so QpQp exists and has order 3×13\times1: one value for each cafe.

Why? Two matrices can only be multiplied when the columns of the first match the rows of the second. The product pQpQ does not exist, because pp has 1 column and QQ has 3 rows, which shows that the order of multiplication matters.

Step 3 - Multiply on the calculator.

Enter QQ as a 3×23\times2 matrix and pp as a 2×12\times1 matrix in matrix mode, then calculate Q×pQ\times p. Each entry is a row of QQ times the column pp: 40(2.50)+30(1.80)=154,25(2.50)+50(1.80)=152.5,35(2.50)+20(1.80)=123.5.40(2.50)+30(1.80)=154,\quad 25(2.50)+50(1.80)=152.5,\quad 35(2.50)+20(1.80)=123.5. So Qp=(154152.5123.5).Qp=\begin{pmatrix}154\\ 152.5\\ 123.5\end{pmatrix}. M1 - Multiply QQ by pp (a row of QQ times the column pp) A1 - (154152.5123.5)\begin{pmatrix}154\\ 152.5\\ 123.5\end{pmatrix}

Why? Each entry is the daily takings in pounds of one cafe, because the number of each drink is multiplied by its own price and the results are added.

Step 4 - Apply the price rise.

A rise of 10% multiplies every price by 1.1, so the new prices are 1.1p1.1p and the new takings are 1.1Qp=1.1(154152.5123.5)=(169.4167.75135.85).1.1\,Qp=1.1\begin{pmatrix}154\\ 152.5\\ 123.5\end{pmatrix}=\begin{pmatrix}169.4\\ 167.75\\ 135.85\end{pmatrix}. Cafe A takes £169.40, cafe B takes £167.75 and cafe C takes £135.85. M1 - Multiply their QpQp by 1.11.1 A1 - 169.4169.4, 167.75167.75 and 135.85135.85

Why? Multiplying a matrix by a scalar multiplies every entry. The result agrees with multiplying each takings value by 1.1, which is a quick check.

Marks (5):
A1 3×23\times2
M1 Multiply QQ by pp (a row of QQ times the column pp)
A1 (154152.5123.5)\begin{pmatrix}154\\ 152.5\\ 123.5\end{pmatrix}
M1 Multiply their QpQp by 1.11.1
A1 169.4169.4, 167.75167.75 and 135.85135.85

Now you try: enter your answers to be marked

These are real practice questions. Type your answer in each box and press Mark it. The worked solution and mark scheme appear straight away, and your first attempt is the one that counts. Use the keyboard for powers, roots and trig, and the working box for your notes.

1
Easy
No calc
[2 marks]
State the order (dimensions) of A=(201453)A = \begin{pmatrix} 2 & 0 & 1 \\ 4 & 5 & 3 \end{pmatrix}, giving your answer as (number of rows, number of columns).
[2]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
Calculator
[2 marks]
A message vector vv is coded using the key matrix K=(1213)K=\begin{pmatrix}1&2\\1&3\end{pmatrix}, giving the coded vector Kv=(811).Kv=\begin{pmatrix}8\\11\end{pmatrix}. Find the original message vector vv.
[2]
Fractions & powers
Other

Worked solution: practice question 2

3
Medium
Calculator
[3 marks]
With T=(0.70.40.30.6)T = \begin{pmatrix} 0.7 & 0.4 \\ 0.3 & 0.6 \end{pmatrix} and initial state (600400)\begin{pmatrix}600\\400\end{pmatrix}, find the distribution after 1 week.
[3]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 7 marks

Common mistakes

  • Assuming matrix multiplication is commutative. ABAB and BABA are generally different matrices, and one might not even be defined - never swap the order without checking the dimensions line up.
  • Multiplying matrices whose dimensions don't allow it. ABAB only exists when the number of columns in AA equals the number of rows in BB - check this before starting the row-by-column arithmetic, not after.
  • Forgetting a zero determinant means no inverse. If detA=0\det A=0, the matrix is singular and A−1A^{-1} doesn't exist - though the IB guarantees AA is invertible whenever a question asks you to find A−1A^{-1}.

Try some questions on matrix operations

Section 2 of 4 AHL1.14

Determinants and inverses

The determinant of (abcd)\begin{pmatrix}a&b\\c&d\end{pmatrix} is ad−bcad-bc, and the matrix has an inverse exactly when this value is not zero. To invert it, swap aa and dd, change the signs of bb and cc, then divide every entry by the determinant. It also covers singular matrices and checking an inverse.

The determinant and inverse formulas

Both formulas below are given in the formula booklet.

Determinant of a 2×22\times2 matrix

detM=ad−bc\det M = ad - bc for M=(abcd)M = \begin{pmatrix}a&b\\c&d\end{pmatrix}

A determinant of 00 means the matrix is singular - it has no inverse, and any system it represents has no unique solution. For the matrix of a transformation, |detM||\det M| is the area scale factor: a region of area AA is mapped to a region of area |detM|A|\det M|\,A.

Inverse of a 2×22\times2 matrix

M−1=1detM(d−b−ca)M^{-1} = \dfrac{1}{\det M}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}

Swap the leading-diagonal entries, negate the other two, then divide everything by the determinant. Only defined when detM≠0\det M \neq 0.

Key terms

What does the determinant tell you?

A non-zero determinant means the matrix has an inverse, and a zero determinant means it does not. The determinant can be positive, negative or zero.

e.g. For (2512)\begin{pmatrix}2&5\\1&2\end{pmatrix}, det=2×2−5×1=−1\det=2\times2-5\times1=-1, which is not zero, so the inverse exists.

What is a singular matrix?

A singular matrix is a square matrix with determinant zero. It has no inverse, so it cannot be used to solve a system by multiplying by A−1A^{-1}.

e.g. (4263)\begin{pmatrix}4&2\\6&3\end{pmatrix} is singular because 4×3−2×6=04\times3-2\times6=0.

What is the identity matrix?

The identity matrix II has 11 on the leading diagonal and 00 elsewhere, and AI=IA=AAI=IA=A. A matrix and its inverse multiply to give II.

e.g. For A=(3152)A=\begin{pmatrix}3&1\\5&2\end{pmatrix}, A−1=(2−1−53)A^{-1}=\begin{pmatrix}2&-1\\-5&3\end{pmatrix} and AA−1=(1001)AA^{-1}=\begin{pmatrix}1&0\\0&1\end{pmatrix}.

How do you find an inverse when the determinant is not 1?

Swap the leading diagonal, negate the other two entries, then multiply by 1det\dfrac{1}{\det}. Every entry of the swapped matrix is divided by the determinant.

e.g. For (2143)\begin{pmatrix}2&1\\4&3\end{pmatrix}, det=2\det=2, so the inverse is 12(3−1−42)=(1.5−0.5−21)\dfrac12\begin{pmatrix}3&-1\\-4&2\end{pmatrix}=\begin{pmatrix}1.5&-0.5\\-2&1\end{pmatrix}.

Worked example, step by step

The question Calculator needed [6 marks]

A map-drawing program moves every point of a plan by multiplying its coordinates by the matrix M=(2k36),M=\begin{pmatrix}2&k\\ 3&6\end{pmatrix}, where kk is a constant. The program can only undo the change if MM has an inverse.

(a) Find detM\det M in terms of kk.

(b) Find the value of kk for which the change cannot be undone.

(c) For k=1k=1, find M−1M^{-1}.

Worked solution: worked example

Answer: (a) 12−3k12-3k (b) k=4k=4 (c) M−1=19(6−1−32)M^{-1}=\dfrac19\begin{pmatrix}6&-1\\ -3&2\end{pmatrix}

Step 1 - Find the determinant.

For (abcd)\begin{pmatrix}a&b\\ c&d\end{pmatrix} the determinant is ad−bcad-bc. Here a=2, b=k, c=3, d=6a=2,\ b=k,\ c=3,\ d=6, so detM=2(6)−k(3)=12−3k.\det M=2(6)-k(3)=12-3k. M1 - Use ad−bcad-bc A1 - 12−3k12-3k

Why? Multiply the leading diagonal and subtract the product of the other diagonal. The answer stays in terms of kk.

Step 2 - Use the condition for an inverse.

A matrix has an inverse exactly when its determinant is not zero. The change cannot be undone when 12−3k=0⇒k=4.12-3k=0\quad\Rightarrow\quad k=4. M1 - Set their determinant equal to 00 A1 - k=4k=4

Why? When detM=0\det M=0 the matrix is singular, and the formula for the inverse would divide by zero.

Step 3 - Substitute k=1k=1 and find the inverse.

Now M=(2136)M=\begin{pmatrix}2&1\\ 3&6\end{pmatrix} and detM=12−3=9\det M=12-3=9, which is not zero. Swap the entries 22 and 66, change the signs of 11 and 33, and divide by 99: M−1=19(6−1−32).M^{-1}=\dfrac{1}{9}\begin{pmatrix}6&-1\\ -3&2\end{pmatrix}. M1 - Use 1detM(d−b−ca)\dfrac{1}{\det M}\begin{pmatrix}d&-b\\ -c&a\end{pmatrix} with detM=9\det M=9 A1 - 19(6−1−32)\dfrac19\begin{pmatrix}6&-1\\ -3&2\end{pmatrix}

Why? The formula is M−1=1detM(d−b−ca)M^{-1}=\dfrac{1}{\det M}\begin{pmatrix}d&-b\\ -c&a\end{pmatrix}. The factor 19\dfrac19 multiplies every entry.

Step 4 - Check on the calculator.

Enter MM and M−1M^{-1} in matrix mode and calculate M×M−1M\times M^{-1}. The calculator returns (1001)\begin{pmatrix}1&0\\ 0&1\end{pmatrix}, the identity matrix.

Why? A matrix times its inverse is the identity, so this confirms the inverse. The calculator's own inverse key gives the same entries as decimals.

Marks (6):
M1 Use ad−bcad-bc
A1 12−3k12-3k
M1 Set their determinant equal to 00
A1 k=4k=4
M1 Use 1detM(d−b−ca)\dfrac{1}{\det M}\begin{pmatrix}d&-b\\ -c&a\end{pmatrix} with detM=9\det M=9
A1 19(6−1−32)\dfrac19\begin{pmatrix}6&-1\\ -3&2\end{pmatrix}

Now you try: enter your answers to be marked

1
Easy
No calc
[2 marks]
Find the determinant of M=(5234)M = \begin{pmatrix} 5 & 2 \\ 3 & 4 \end{pmatrix}.
[2]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
Calculator
[4 marks]
A transformation has matrix T=(3112)T = \begin{pmatrix}3 & 1 \\ 1 & 2\end{pmatrix}.
(a) Find detT\det T.
[2]
(b) State the area scale factor of the transformation and find the image area of a unit square.
[2]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[5 marks]
A shop sells apples and bananas. 3 apples and 2 bananas cost £2.80; 1 apple and 4 bananas cost £2.20. Set up and solve the system using matrix inverses, giving prices in pence.
[5]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 11 marks

Common mistakes

  • Mixing up ad−bcad-bc with ac−bdac-bd. The determinant multiplies along the leading diagonal first (a×da\times d), then subtracts the product of the other diagonal (b×cb\times c) - keep the entries in the right pairs.
  • Forgetting to swap the leading diagonal in the inverse. aa and dd trade places, while bb and cc simply get a minus sign - it's easy to negate the wrong pair under time pressure.
  • Trying to invert a matrix with determinant zero. Check detM≠0\det M \neq 0 before dividing - a zero determinant means the inverse doesn't exist, not that you made an arithmetic slip.

Try some questions on determinants and inverses

Section 3 of 4 AHL1.14

Solving systems with matrices

A system of linear equations can be written as Ax=bA\mathbf{x}=\mathbf{b}, where AA holds the coefficients, x\mathbf{x} the unknowns and b\mathbf{b} the constants. When AA is invertible, multiply both sides on the left by A−1A^{-1} to get x=A−1b\mathbf{x}=A^{-1}\mathbf{b}. It also covers setting up the matrices correctly and recognising when no inverse exists.

Solving Ax=bA\mathbf x = \mathbf b

Singular matrices

detA=0⇒A−1 does not exist\det A = 0 \Rightarrow A^{-1}\text{ does not exist}

A singular matrix has no inverse, and the corresponding system of equations has no unique solution - it is either inconsistent or has infinitely many solutions.

Key terms

What is the coefficient matrix?

The coefficient matrix AA contains the coefficients of the unknowns, with one row for each equation and one column for each unknown. The unknowns are kept in the same order in every row.

e.g. The system 2x+3y=72x+3y=7, x−y=1x-y=1 has A=(231−1)A=\begin{pmatrix}2&3\\1&-1\end{pmatrix}.

What is an inverse matrix?

The inverse A−1A^{-1} is the matrix that satisfies AA−1=A−1A=IAA^{-1}=A^{-1}A=I. It exists only when the determinant of AA is not zero.

e.g. The inverse of (2111)\begin{pmatrix}2&1\\1&1\end{pmatrix} is (1−1−12)\begin{pmatrix}1&-1\\-1&2\end{pmatrix}, because their product is (1001)\begin{pmatrix}1&0\\0&1\end{pmatrix}.

Why does the order of multiplication matter?

Matrix multiplication is not commutative, so A−1A^{-1} must go on the left of b\mathbf{b}. Multiplying on the right is usually not even possible.

e.g. For a 2×22\times2 matrix A−1A^{-1} and a column b\mathbf{b} of order 2×12\times1, A−1bA^{-1}\mathbf{b} is defined but bA−1\mathbf{b}A^{-1} is not.

What is the identity matrix?

The identity matrix II has 11 on the leading diagonal and 00 elsewhere, and Ix=xI\mathbf{x}=\mathbf{x}. It is why multiplying both sides by A−1A^{-1} isolates x\mathbf{x}.

e.g. A−1Ax=Ix=xA^{-1}A\mathbf{x}=I\mathbf{x}=\mathbf{x}, where for a 2×22\times2 system I=(1001)I=\begin{pmatrix}1&0\\0&1\end{pmatrix}.

Worked example, step by step

The question Calculator needed [5 marks]

A cafe sells bagels, muffins and smoothies. On Monday, 4 bagels, 2 muffins and 1 smoothie cost £21.00 in total. On Tuesday, 2 bagels, 3 muffins and 2 smoothies cost £21.50. On Wednesday, 1 bagel, 1 muffin and 3 smoothies cost £17.50.

Use a matrix method to find the price of each item.

Worked solution: worked example

Answer: Bagel £3.00, muffin £2.50, smoothie £4.00

Step 1 - Define the unknowns and write the equations.

Let x, y, zx,\ y,\ z be the prices in pounds of a bagel, a muffin and a smoothie. Then 4x+2y+z=212x+3y+2z=21.5x+y+3z=17.5.\begin{aligned}4x+2y+z&=21\\ 2x+3y+2z&=21.5\\ x+y+3z&=17.5.\end{aligned} M1 - Form the three equations

Why? There is one equation for each day, with the number of each item as the coefficients. Naming the unknowns first keeps the final answer in context.

Step 2 - Write the system as Ax=bA\mathbf{x}=\mathbf{b}.

(421232113)(xyz)=(2121.517.5).\begin{pmatrix}4&2&1\\ 2&3&2\\ 1&1&3\end{pmatrix}\begin{pmatrix}x\\ y\\ z\end{pmatrix}=\begin{pmatrix}21\\ 21.5\\ 17.5\end{pmatrix}. The calculator gives detA=19\det A=19, which is not zero, so AA has an inverse and x=A−1b\mathbf{x}=A^{-1}\mathbf{b}. M1 - Write Ax=bA\mathbf{x}=\mathbf{b} and use x=A−1b\mathbf{x}=A^{-1}\mathbf{b}

Why? Each row of AA holds the coefficients of one equation and b\mathbf{b} holds the totals. Multiply by the inverse on the left of b\mathbf{b}, because matrix multiplication is not commutative.

Step 3 - Calculate on the calculator.

Enter AA as a 3×33\times3 matrix and b\mathbf{b} as a 3×13\times1 matrix, then calculate A−1×bA^{-1}\times\mathbf{b}. The calculator returns (xyz)=(32.54).\begin{pmatrix}x\\ y\\ z\end{pmatrix}=\begin{pmatrix}3\\ 2.5\\ 4\end{pmatrix}. A1 - Bagel 33 A1 - Muffin 2.52.5 A1 - Smoothie 44

Why? The equation solver in the calculator gives the same values, and either route is accepted. State the result in words: a bagel costs £3.00, a muffin £2.50 and a smoothie £4.00.

Step 4 - Check in an equation.

Wednesday: 3+2.5+3(4)=17.53+2.5+3(4)=17.5, which agrees with the total.

Why? Substituting the three prices back into one of the original equations is a quick check that the matrices were entered correctly. Repeat it with the other two equations for a full check.

Marks (5):
M1 Form the three equations
M1 Write Ax=bA\mathbf{x}=\mathbf{b} and use x=A−1b\mathbf{x}=A^{-1}\mathbf{b}
A1 Bagel 33
A1 Muffin 2.52.5
A1 Smoothie 44

Now you try: enter your answers to be marked

1
Easy
Calculator
[4 marks]
Three unknowns x, y,x,\ y, and zz satisfy the equations below. By finding the inverse of the coefficient matrix, solve the system for x, y,x,\ y, and z.z.

{x+y+z=6x−y+2z=72x+y−z=2\begin{cases} x + y + z = 6 \\ x - y + 2z = 7 \\ 2x + y - z = 2 \end{cases}
[4]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
Calculator
[5 marks]
A quadratic model y=ax2+bx+cy=ax^2+bx+c passes through the points (0,4), (1,9)(0,4),\ (1,9) and (2,18).(2,18).

Find a, b, ca,\ b,\ c using matrix methods.
[5]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[6 marks]
A gardener mixes three fertilisers X, Y, ZX,\ Y,\ Z to create 10 kg of a blend containing 11% nitrogen. Fertiliser XX is 5% nitrogen, YY is 10% nitrogen, and ZZ is 15% nitrogen. The gardener uses twice as much ZZ as X.X.

Set up and solve, using matrices, a system of equations to find the mass, in kg, of each fertiliser used.
[6]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 15 marks

Common mistakes

  • Multiplying A−1bA^{-1}\mathbf b in the wrong order. Matrix multiplication is non-commutative - it must be A−1bA^{-1}\mathbf b, not bA−1\mathbf b A^{-1}, which usually isn't even a valid multiplication for a column vector.
  • Missing a sign or entry when reading off the system into AA and b\mathbf b. Write each equation in the same variable order first (x,y,zx,y,z) before copying coefficients across, so nothing gets transposed by accident.
  • Not checking detA≠0\det A \neq 0 before trusting a unique solution. If the determinant comes out as zero, the system does not have a single A−1bA^{-1}\mathbf b answer - it's either inconsistent or has infinitely many solutions, and needs a different argument.

Try some questions on solving systems with matrices

Section 4 of 4 AHL1.15

Eigenvalues and eigenvectors

An eigenvector of a matrix AA is a non-zero vector v\mathbf{v} that satisfies Av=λvA\mathbf{v}=\lambda\mathbf{v}, where the scalar λ\lambda is the eigenvalue. For a 2×22\times2 matrix, solve the characteristic equation to find λ\lambda, then solve for v\mathbf{v} for each eigenvalue. It also covers diagonalisation and using it to find powers of a matrix.

Finding eigenvalues and eigenvectors

The formula below is not in the formula booklet - it is a definition you apply directly.

Eigenvector for a given λ\lambda

(A−λI)v=0(A - \lambda I)\mathbf v = \mathbf 0

Substitute one eigenvalue at a time and solve the resulting equations for v\mathbf v. Any non-zero scalar multiple of the answer is an equally valid eigenvector.

Key terms

What is the characteristic polynomial?

It is the expression det(A−λI)\det(A-\lambda I). For a 2×22\times2 matrix it is a quadratic in λ\lambda, and its roots are the eigenvalues.

e.g. For B=(5214)B=\begin{pmatrix}5&2\\1&4\end{pmatrix}, det(B−λI)=(5−λ)(4−λ)−2=λ2−9λ+18\det(B-\lambda I)=(5-\lambda)(4-\lambda)-2=\lambda^2-9\lambda+18, so λ=6\lambda=6 or λ=3\lambda=3.

What is an eigenvalue?

An eigenvalue is the scale factor λ\lambda by which a matrix stretches or shrinks one of its eigenvectors. A 2×22\times2 matrix has at most two eigenvalues, and a diagonal matrix has its diagonal entries as eigenvalues.

e.g. With B=(5214)B=\begin{pmatrix}5&2\\1&4\end{pmatrix} and v=(21)\mathbf{v}=\begin{pmatrix}2\\1\end{pmatrix}, Bv=(126)=6vB\mathbf{v}=\begin{pmatrix}12\\6\end{pmatrix}=6\mathbf{v}, so λ=6\lambda=6.

What is an eigenvector?

An eigenvector is a non-zero vector whose direction is unchanged when it is multiplied by the matrix. Each eigenvalue has a whole family of eigenvectors, all scalar multiples of one another.

e.g. For λ=3\lambda=3, (B−3I)v=0(B-3I)\mathbf{v}=\mathbf{0} gives 2x+2y=02x+2y=0, so v=(1−1)\mathbf{v}=\begin{pmatrix}1\\-1\end{pmatrix}, and Bv=(3−3)=3vB\mathbf{v}=\begin{pmatrix}3\\-3\end{pmatrix}=3\mathbf{v}.

What does it mean to diagonalise a matrix?

Diagonalising writes the matrix as M=PDP−1M=PDP^{-1}, where DD is a diagonal matrix of eigenvalues and the columns of PP are the matching eigenvectors. It needs two distinct real eigenvalues for a 2×22\times2 matrix. Then Mn=PDnP−1M^n=PD^nP^{-1}, and DnD^n is found by raising each diagonal entry of DD to the power nn.

e.g. For (5214)\begin{pmatrix}5&2\\1&4\end{pmatrix}, D=(6003)D=\begin{pmatrix}6&0\\0&3\end{pmatrix} and P=(211−1)P=\begin{pmatrix}2&1\\1&-1\end{pmatrix}.

Worked example, step by step

The question Calculator needed [6 marks]

The numbers of animals, in hundreds, of two species in a nature reserve in year nn are xnx_n and yny_n. They are modelled by (xn+1yn+1)=M(xnyn),M=(1.10.20.30.6).\begin{pmatrix}x_{n+1}\\ y_{n+1}\end{pmatrix}=M\begin{pmatrix}x_n\\ y_n\end{pmatrix},\qquad M=\begin{pmatrix}1.1&0.2\\ 0.3&0.6\end{pmatrix}.
(a) Show that the eigenvalues λ\lambda of MM satisfy λ2−1.7λ+0.6=0\lambda^2-1.7\lambda+0.6=0.

(b) Find the eigenvalues of MM.

(c) Find an eigenvector of MM for the larger eigenvalue, with second component 11.

Worked solution: worked example

Answer: (b) λ=1.2\lambda=1.2 and λ=0.5\lambda=0.5 (c) (21)\begin{pmatrix}2\\ 1\end{pmatrix}

Step 1 - Write the characteristic equation.

The eigenvalues satisfy det(M−λI)=0\det(M-\lambda I)=0: |1.1−λ0.20.30.6−λ|=0.\begin{vmatrix}1.1-\lambda&0.2\\ 0.3&0.6-\lambda\end{vmatrix}=0. M1 - Use det(M−λI)=0\det(M-\lambda I)=0

Why? An eigenvector v\mathbf{v} satisfies (M−λI)v=0(M-\lambda I)\mathbf{v}=\mathbf{0} with v\mathbf{v} not zero, which is only possible when M−λIM-\lambda I has no inverse, that is when its determinant is zero.

Step 2 - Expand the determinant.

(1.1−λ)(0.6−λ)−(0.2)(0.3)=λ2−1.7λ+0.66−0.06=λ2−1.7λ+0.6.(1.1-\lambda)(0.6-\lambda)-(0.2)(0.3)=\lambda^2-1.7\lambda+0.66-0.06=\lambda^2-1.7\lambda+0.6. So λ2−1.7λ+0.6=0\lambda^2-1.7\lambda+0.6=0, as required. A1 - Expand to λ2−1.7λ+0.6=0\lambda^2-1.7\lambda+0.6=0

Why? The number 1.71.7 is the trace of MM (the sum of the diagonal entries) and 0.60.6 is detM\det M, which gives a quick check.

Step 3 - Solve for the eigenvalues.

Enter the quadratic in the polynomial solver, or use the eigenvalue command with MM entered as a 2×22\times2 matrix. The calculator gives λ=1.2andλ=0.5.\lambda=1.2\quad\text{and}\quad\lambda=0.5. A1 - λ=1.2\lambda=1.2 A1 - λ=0.5\lambda=0.5

Why? Both are real and different, so MM can be diagonalised. The calculator may return them in either order.

Step 4 - Find the eigenvector for λ=1.2\lambda=1.2.

(M−1.2I)v=(−0.10.20.3−0.6)(ab)=(00).(M-1.2I)\mathbf{v}=\begin{pmatrix}-0.1&0.2\\ 0.3&-0.6\end{pmatrix}\begin{pmatrix}a\\ b\end{pmatrix}=\begin{pmatrix}0\\ 0\end{pmatrix}. The first row gives −0.1a+0.2b=0-0.1a+0.2b=0, so a=2ba=2b. With second component b=1b=1, v=(21).\mathbf{v}=\begin{pmatrix}2\\ 1\end{pmatrix}. M1 - Use (M−1.2I)v=0(M-1.2I)\mathbf{v}=\mathbf{0} A1 - (21)\begin{pmatrix}2\\ 1\end{pmatrix}

Why? The second row is 33 times the first, so it gives the same equation. Any non-zero multiple of v\mathbf{v} is also an eigenvector, which is why the question fixes the second component. Check: Mv=(2.41.2)=1.2vM\mathbf{v}=\begin{pmatrix}2.4\\ 1.2\end{pmatrix}=1.2\mathbf{v}.

Marks (6):
M1 Use det(M−λI)=0\det(M-\lambda I)=0
A1 Expand to λ2−1.7λ+0.6=0\lambda^2-1.7\lambda+0.6=0
A1 λ=1.2\lambda=1.2
A1 λ=0.5\lambda=0.5
M1 Use (M−1.2I)v=0(M-1.2I)\mathbf{v}=\mathbf{0}
A1 (21)\begin{pmatrix}2\\ 1\end{pmatrix}

Now you try: enter your answers to be marked

1
Easy
No calc
[3 marks]
D=(3007).D = \begin{pmatrix}3 & 0 \\ 0 & 7\end{pmatrix}.
(a)(i) State the eigenvalue with λ<5\lambda<5, without calculation.
[2]
(a)(ii) State the eigenvalue with λ>5.\lambda>5.
[1]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
No calc
[4 marks]
The matrix C=(1232)C = \begin{pmatrix}1 & 2 \\ 3 & 2\end{pmatrix} has eigenvalue λ=4.\lambda = 4. Find the corresponding eigenvector whose first component is 22.
[4]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[6 marks]
For A=(4123)A = \begin{pmatrix}4 & 1 \\ 2 & 3\end{pmatrix} with eigenvalues 55 and 22, find an eigenvector for each, giving each eigenvector with first component 11.
(a)(i) Find an eigenvector for eigenvalue λ=5\lambda=5.
[3]
(a)(ii) Find an eigenvector for eigenvalue λ=2\lambda=2.
[3]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 13 marks

Common mistakes

  • Forgetting to subtract λI\lambda I from the whole matrix. Only the diagonal entries of AA change when forming A−λIA - \lambda I - the off-diagonal entries stay exactly as they were.
  • Stopping after finding the eigenvalues. A question asking for eigenvectors needs you to substitute each λ\lambda back into (A−λI)v=0(A-\lambda I)\mathbf v = \mathbf 0 and solve - the eigenvalues alone aren't the full answer.
  • Assuming an eigenvector answer is unique. Any non-zero scalar multiple of a valid eigenvector, such as (2−2)\begin{pmatrix}2\\-2\end{pmatrix} instead of (1−1)\begin{pmatrix}1\\-1\end{pmatrix}, is equally correct - don't second-guess a "different" answer that's really the same direction.

Try some questions on eigenvalues and eigenvectors

Using your GDC

The exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX, with what the screen shows. Pick your calculator.

Matrix operations and solving systems

Used in: Matrix operations, Determinants and inverses, Solving systems with matrices

How to use matrices on a TI-84 Plus CE

Enter a matrix

Press 2nd x⁻¹ (MATRIX), press ▶ twice to reach EDIT, choose 1:[A] and press enter.

Type the size, 2 enter 2 enter for 2 rows and 2 columns, then type the numbers row by row, pressing enter after each one. Use (−) for a negative number.

MATRIX[A] 2 ×2
[[2  1]
[1  3]]

Enter the second matrix the same way in 2:[B] and the right-hand side as a 2 by 1 matrix in 3:[C]. Press 2nd mode (QUIT) when you have finished.

MATRIX[C] 2 ×1
[[5]
[10]]
Add, multiply, determinant and inverse

On the home screen press 2nd x⁻¹ (MATRIX), choose 1:[A] from the NAMES list and press enter. Then press +, paste [B] in the same way, and press enter. A matrix name can only be pasted from this menu, not typed. Use × instead of + to multiply.

A+B=(3347)A + B = \begin{pmatrix}3 & 3 \\ 4 & 7\end{pmatrix} and AB=(581014)AB = \begin{pmatrix}5 & 8 \\ 10 & 14\end{pmatrix}.

[A]+[B]
[[3  3]
[4  7]]
[A]*[B]
[[5  8]
[10  14]]

For the determinant, press 2nd x⁻¹ (MATRIX), press ▶ to reach MATH, choose 1:det(, paste [A] from NAMES, type ) and press enter.

detA=5\det A = 5.

det([A])
5

For the inverse, paste [A], press x⁻¹, then enter. The answer is in decimals. To see fractions, press math, choose 1:▶Frac and press enter.

A−1=15(3−1−12)A^{-1} = \dfrac{1}{5}\begin{pmatrix}3 & -1 \\ -1 & 2\end{pmatrix}, which is (0.6−0.2−0.20.4)\begin{pmatrix}0.6 & -0.2 \\ -0.2 & 0.4\end{pmatrix} in decimal form.

[A]-1
[[0.6  −0.2]
[−0.2  0.4]]
Ans▶Frac
[[3/5  −1/5]
[−1/5  2/5]]
Solve a system with the inverse

To solve Ax=bA\mathbf{x} = \mathbf{b}, paste [A], press x⁻¹, then ×, paste [C] and press enter. The inverse must come first: A−1bA^{-1}\mathbf{b} is not the same as bA−1\mathbf{b}A^{-1}.

x=1x = 1 and y=3y = 3.

[A]-1*[C]
[[1]
[3]]

Paste matrix names from the MATRIX menu rather than typing them, and put the inverse on the left when you solve a system.

The full guide: Matrix operations and solving systems

Solve a system of equations

Used in: Solving systems with matrices

How to solve a system of equations on a TI-84 Plus CE

Simultaneous Equation Solver app (PlySmlt2)

Press apps and choose PlySmlt2. An information screen appears: press any key to reach the MAIN MENU, then choose Simultaneous Eqn Solver.

On the mode screen choose 3 equations and 3 unknowns. Choose Dec instead of Auto if you want decimal answers rather than fractions. Choose NEXT, using the key directly below it on the screen.

Equations: 3
Unknowns: 3

Enter the coefficients row by row, one row for each equation, with the constant (the number on the right of the equals sign) last. Press enter after each number to move to the next position. For a negative number use (−), not the subtraction key. Write each equation as ax+by+cz=dax + by + cz = d first: a missing term has coefficient 0.

1  2  3  10
2  -1  1  3
3  1  -2  1

Choose SOLVE, using the key directly below it on the screen. The solution for each unknown is shown.

x=6/5x = 6/5, y=7/5y = 7/5 and z=2z = 2, which is x=1.2x = 1.2, y=1.4y = 1.4 and z=2z = 2 in decimal form.

x1=6/5
x2=7/5
x3=2

If the system has no solution or infinitely many solutions, the app does not show a single answer. The rref choice then shows the reduced row-echelon form, where a row of zeros followed by a non-zero number means no solution. To leave the app, go to the main menu and choose Quit App.

Check each solution by substituting it back into one of the original equations, in case a coefficient was typed in the wrong place.

The full guide: Solve a system of equations

Eigenvalues and eigenvectors

Used in: Eigenvalues and eigenvectors

How to find eigenvalues and eigenvectors on a TI-84 Plus CE

No eigenvalue command: characteristic equation and rref

Press 2nd x⁻¹ (MATRIX), press ▶ to the EDIT menu and choose 1:[A]. Enter the size, 2 enter 2 enter, then the entries row by row, pressing enter after each: 6, 2, 1, 5. Press 2nd mode (QUIT) to leave the editor.

MATRIX[A] 2 ×2
[ 6 2 ]
[ 1 5 ]

The manual lists no eigenvalue or eigenvector command for this calculator, so the eigenvalues come from the characteristic equation. For a 2×22\times2 matrix it is λ2−(trace)λ+det=0\lambda^2 - (\text{trace})\lambda + \det = 0. Here the trace is 6+5=116+5 = 11 and the determinant is 6×5−2×1=286\times5 - 2\times1 = 28, so it is λ2−11λ+28=0\lambda^2 - 11\lambda + 28 = 0.

Press apps and choose PlySmlt2, press any key, then choose 1:Polynomial Root Finder. Set ORDER to 2, press graph under NEXT, and enter the coefficients 1 enter, (−) 1 1 enter, 2 8 enter. Press graph under SOLVE.

The eigenvalues are λ=4\lambda = 4 and λ=7\lambda = 7.

X1=4
X2=7

For an eigenvector, row-reduce M−λIM - \lambda I. Quit the app, then on the home screen press 2nd x⁻¹ (MATRIX), ▶ to MATH, and choose B:rref(. Type [A] from 2nd x⁻¹ (MATRIX) 1:[A], then − 7 ×, and choose 5:identity( from the same MATH menu, followed by 2 ) ) and enter. This is rref([A]-7*identity(2)) for λ=7\lambda = 7.

Each row of the result is an equation in xx and yy. (1−200)\begin{pmatrix}1 & -2\\0 & 0\end{pmatrix} means x−2y=0x - 2y = 0, so x=2yx = 2y and an eigenvector for λ=7\lambda = 7 is (21)\begin{pmatrix}2\\1\end{pmatrix}. Repeat with 44 in place of 77: the result (1100)\begin{pmatrix}1 & 1\\0 & 0\end{pmatrix} means x+y=0x + y = 0, so an eigenvector is (1−1)\begin{pmatrix}1\\-1\end{pmatrix}.

rref([A]-7*identity(2))
[[1 -2]
[0 0]]

Any non-zero multiple of an eigenvector is also an eigenvector, so (2, 1) and (4, 2) are equally correct. The identity size must match the matrix: identity(2) for a 2 by 2.

The full guide: Eigenvalues and eigenvectors

See the full list of GDC guides for every calculator task.

Syllabus content covered

CodeSyllabus content
AHL1.14Definition of a matrix: the terms element, row, column and order for m×nm\times n matrices. Algebra of matrices: equality; addition; subtraction; multiplication by a scalar for m×nm\times n matrices (including use of technology). Multiplication of matrices (multiplying matrices to solve practical problems). Properties of matrix multiplication: associativity, distributivity and non-commutativity. Identity and zero matrices (students should be familiar with the notation II and 00). Determinants and inverses of n×nn\times n matrices with technology, and by hand for 2×22\times2 matrices. Awareness that a system of linear equations can be written in the form Ax=bA\mathbf{x}=\mathbf{b}. Solution of the systems of equations using inverse matrix. In examinations AA will always be an invertible matrix, except when solving for eigenvectors.
AHL1.15Eigenvalues and eigenvectors. Characteristic polynomial of 2×22\times2 matrices. Diagonalization of 2×22\times2 matrices (restricted to the case where there are distinct real eigenvalues). Applications to powers of 2×22\times2 matrices: Mn=PDnP−1M^n=PD^nP^{-1}, where PP is a matrix of eigenvectors, and DD is a diagonal matrix of eigenvalues. Students will only be expected to perform calculations by hand and with technology for 2×22\times2 matrices.

Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).

Quick questions

How do you multiply two matrices together?

Multiply each row of the first matrix by each column of the second, summing the products, so entry (i,j)(i,j) of the result is row ii of AA dotted with column jj of BB. This only works when the columns of AA match the rows of BB.

What is the formula for the determinant of a 2x2 matrix?

For M=(abcd)M = \begin{pmatrix}a&b\\c&d\end{pmatrix}, detM=ad−bc\det M = ad - bc.

How do you solve a system of equations using matrices?

Write the system as Ax=bA\mathbf x=\mathbf b, then solve for x\mathbf x by computing x=A−1b\mathbf x = A^{-1}\mathbf b. On an IB exam, AA will always be invertible unless you are specifically solving for eigenvectors.

How do you find the eigenvalues of a 2x2 matrix?

Solve the characteristic equation det(A−λI)=0\det(A-\lambda I) = 0. This expands to a quadratic in λ\lambda; its two roots are the eigenvalues.

When can two matrices be added?

Only when they have the same order, because addition works entry by entry. A 2×22\times2 matrix and a 2×32\times3 matrix cannot be added.

What is the formula for the inverse of a 2x2 matrix?

M−1=1detM(d−b−ca)M^{-1} = \tfrac{1}{\det M}\begin{pmatrix}d&-b\\-c&a\end{pmatrix} - swap the leading diagonal, negate the other two entries, then divide by the determinant. It only exists when the determinant is not zero.

What does it mean if the coefficient matrix has determinant zero?

A determinant of zero means the matrix is singular and has no inverse, so the system has no unique solution - it is either inconsistent (no solutions) or dependent (infinitely many).

How do you find an eigenvector once you know an eigenvalue?

Substitute the eigenvalue into (A−λI)v=0(A-\lambda I)\mathbf v = \mathbf 0 and solve the resulting equations for v\mathbf v. Any non-zero scalar multiple of the resulting vector is a valid eigenvector.

What is the order of a product of two matrices?

If AA has order m×nm\times n and BB has order n×pn\times p, then ABAB has order m×pm\times p. For example, a 3×23\times2 matrix times a 2×12\times1 matrix gives a 3×13\times1 matrix.

Can a determinant be negative?

Yes. A negative determinant is perfectly valid and the matrix still has an inverse. For (2512)\begin{pmatrix}2&5\\1&2\end{pmatrix}, det=−1\det=-1 and the inverse is (−251−2)\begin{pmatrix}-2&5\\1&-2\end{pmatrix}.

Ready to practise properly?

Practice questions on every section, marked instantly like the real exam.