IB Maths Help logoIB Maths Help

Matrix operations and solving systems

Work with matrices using the exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX: enter a matrix, add and multiply, find a determinant and an inverse, and solve a system with the inverse, plus what to write in the exam.

Used inAI HL

To work with matrices on a calculator, enter each matrix by giving its size and then its numbers row by row, and store it under a name. Then use the names in a calculation: add or multiply them, use the determinant command for the determinant, and the inverse key for the inverse. To solve Ax = b, calculate the inverse of A multiplied by b, with the inverse on the left.

Example

A=(2113)A = \begin{pmatrix}2 & 1 \\ 1 & 3\end{pmatrix}, B=(1234)B = \begin{pmatrix}1 & 2 \\ 3 & 4\end{pmatrix} and b=(510)\mathbf{b} = \begin{pmatrix}5 \\ 10\end{pmatrix}. Find A+BA + B, ABAB, detA\det A and A−1A^{-1}, and use A−1A^{-1} to solve Ax=bA\mathbf{x} = \mathbf{b}.

Add or multiply the stored matrices to get 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}. The determinant is detA=5\det A = 5, which is not zero, so the inverse exists: A−1=15(3−1−12)A^{-1} = \dfrac{1}{5}\begin{pmatrix}3 & -1 \\ -1 & 2\end{pmatrix}. Then x=A−1b=(13)\mathbf{x} = A^{-1}\mathbf{b} = \begin{pmatrix}1 \\ 3\end{pmatrix}, so x=1x = 1 and y=3y = 3.

Choose your calculator

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.

How to use matrices on a Casio fx-CG50

Enter a matrix

Press MENU and choose Run-Matrix, then press F3 (MAT/VCT) to open the Matrix Editor. Use ▲ and ▼ to highlight Mat A, then press F3 (DIM).

Type the number of rows, 2 EXE, then the number of columns, 2 EXE, and press EXE again. The new matrix is filled with zeros.

Mat A: 2 ×2
[[0  0]
[0  0]]

Type the numbers row by row, pressing EXE after each one: the highlight moves to the next cell. Use (−) for a negative number.

Enter Mat B in the same way, and the right-hand side as Mat C with 2 rows and 1 column. Press EXIT to return to the run screen.

Mat A
[[2  1]
[1  3]]

Add, multiply, determinant and inverse

Press OPTN, then F2 (MAT/VCT), then F1 (Mat). Press ALPHA X,θ,T to type the letter A. Then press +, choose Mat again, type B with ALPHA log, and press EXE. 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}.

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

For the determinant, press OPTN, F2 (MAT/VCT), then F3 (Det). Choose Mat with F1, type A, and press EXE.

detA=5\det A = 5.

Det Mat A
5

For the inverse, choose Mat A as before, then press SHIFT and the key with x⁻¹ printed above it, and press EXE.

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.

Mat A-1
[[0.6  −0.2]
[−0.2  0.4]]

Solve a system with the inverse

Enter Mat A, press SHIFT and the x⁻¹ key, then ×, choose Mat, type C with ALPHA ln, and press EXE. The inverse comes first, on the left.

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

Mat A-1×Mat C
[[1]
[3]]

Changing the size of a matrix clears what it held, so set the size before you type the numbers.

How to use matrices on a Casio fx-CG100

Enter a matrix

Press HOME and choose Calculate. Go to the Matrix tab with the previous-tab key, highlight Mat A, and choose TOOLS → Dimension. Enter 2 rows and 2 columns, 2 EXE 2 EXE, and press OK.

Mat A: 2 ×2

Type the numbers row by row, pressing EXE after each one. Press OK to go back to the Matrix list, and enter Mat B and Mat C (2 rows and 1 column) in the same way.

Mat A
[[2  1]
[1  3]]

Add, multiply, determinant and inverse

Go back to the Calculation tab. Open the Variable menu, choose Matrix → Mat A, press +, choose Mat B from the same menu and press EXE. 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}.

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

For the determinant, press CATALOG, choose Matrix → Determinant Det(), then choose Mat A from the Variable menu, close the bracket and press EXE.

detA=5\det A = 5.

Det(Mat A)
5

For the inverse, enter Mat A and then press CATALOG, choose Matrix → Inverse Matrix -1, and press EXE.

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.

Mat A-1
[[0.6  −0.2]
[−0.2  0.4]]

Solve a system with the inverse

Enter Mat A followed by Inverse Matrix -1, press ×, choose Mat C from the Variable menu and press EXE. The inverse comes first, on the left.

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

Mat A-1×Mat C
[[1]
[3]]

A matrix with a determinant near zero gives a less accurate inverse, so check the answer by multiplying back.

How to use matrices on a TI-Nspire CX

Enter and store a matrix

On a Calculator page press menu → Matrix & Vector → Create → Matrix. Enter 2 rows and 2 columns and choose OK. Type the numbers row by row, using tab to move between cells.

You can also type the whole matrix, with commas between the numbers in a row and a semicolon between rows: [2, 1; 1, 3].

[[2  1]
[1  3]]

Press ctrl var (sto→), type the name a, and press enter to store the matrix. Store the second matrix as b and the right-hand side, a 2 by 1 matrix, as c.

[...]→a

Add, multiply, determinant and inverse

Type a + b and press enter. 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 menu → Matrix & Vector → Determinant, type a, close the bracket and press enter.

detA=5\det A = 5.

det(a)
5

For the inverse, type a ^ (−) 1 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
[[3/5  −1/5]
[−1/5  2/5]]

Solve a system with the inverse

Type a ^ (−) 1 × c and press enter. The inverse comes first, on the left.

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

a-1·c
[[1]
[3]]

Give each matrix a name once, then use the name in every calculation instead of typing the matrix again.

Sources. Key presses follow the manufacturers' documentation: the TI-84 Plus CE eGuide, the TI-Nspire eGuide, the Casio fx-CG50 Software User's Guide (version 3.30) and the Casio fx-CG100 online manual.

What to write in the exam

  • Write the matrix result and say how you got it. For example, write detA=5\det A = 5 or A−1A^{-1} as a matrix and state that you used your calculator. Do not write the key presses.
  • For a system, show the method. Write Ax=bA\mathbf{x} = \mathbf{b}, then x=A−1b\mathbf{x} = A^{-1}\mathbf{b}, then the values. A bare answer may not earn the method mark.
  • Give exact values when you can. An inverse such as 15\dfrac{1}{5} times a matrix is better than decimals. Otherwise give 3 significant figures, and keep the full calculator values for later parts.
  • Check the determinant first. If detA=0\det A = 0 there is no inverse, and the system has no solution or infinitely many.
  • Check which papers allow a calculator. In AI HL a calculator is allowed on every paper (check your syllabus).

Powers of a matrix

To raise a matrix to a power, such as a transition matrix in a Markov chain, enter the matrix and use the power key. The steps are in matrix powers. For a system of equations without matrices, see solving a system of equations.

Error messages and what to do

CalculatorMessageUsual causeWhat to try
TI-84 Plus CEERR:DIMENSION MISMATCHThe matrices cannot be added or multiplied: to add, the sizes must be the same; to multiply, the number of columns of the first must equal the number of rows of the second.Check the size of each matrix, and the order you multiply them in.
TI-84 Plus CEERR:SINGULAR MATRIXThe determinant is 0, so the matrix has no inverse.Check the numbers you entered. If they are right, the matrix has no inverse and the system has no unique solution.
TI-84 Plus CEERR:INVALID DIMENSIONYou tried to invert a matrix that is not square.Only a square matrix has an inverse: check its size.
Casio fx-CG50Dimension ERRORThe matrices have sizes that do not allow the operation, for example adding a 2 by 2 and a 2 by 1.Check the size of each matrix, and the order you multiply them in.
Casio fx-CG50Ma ERRORThe determinant is 0, so the matrix cannot be inverted.Check the numbers you entered. If they are right, the matrix has no inverse.
Casio fx-CG100Dimension ERRORThe matrices have sizes that do not allow the operation, for example adding a 2 by 2 and a 2 by 1.Check the size of each matrix, and the order you multiply them in.
Casio fx-CG100Math ERRORThe determinant is 0, so the matrix cannot be inverted.Check the numbers you entered. If they are right, the matrix has no inverse.
TI-Nspire CXDimension mismatchThe matrices have sizes that do not allow the operation, for example adding a 2 by 2 and a 2 by 1.Check the size of each matrix, and the order you multiply them in.
TI-Nspire CXDivide by zeroThe determinant is 0, so the matrix has no inverse.Check the numbers you entered. If they are right, the matrix has no inverse.

Common mistakes

  • Multiplying in the wrong order. Matrix multiplication is not commutative: AB=(581014)AB = \begin{pmatrix}5 & 8 \\ 10 & 14\end{pmatrix} but BA=(471015)BA = \begin{pmatrix}4 & 7 \\ 10 & 15\end{pmatrix}. To solve Ax=bA\mathbf{x} = \mathbf{b}, the inverse goes on the left of b\mathbf{b}.
  • Typing the numbers in the wrong places. Enter the numbers row by row, and check the size before you start: changing the size can clear the matrix.
  • Using the subtraction key for a negative number. Use the negative key, or the calculator reports an error or reads a different number.
  • Inverting a matrix with determinant zero. There is no inverse, and the calculator shows an error. Check the numbers, then say the system has no unique solution.
  • Writing key presses as working. Write the matrices and the results. The examiner needs the method, not the keys.

Try it yourself

Real questions from the IB Maths Help question bank. Type your answer and press Mark it: the worked solution and mark scheme then appear. Use your calculator to find the determinant.

Practise with your calculator

Choose your course to see the practice sets that use this skill. You can also try practice mode or browse every GDC guide.

Quick questions

How do I find the inverse of a matrix on a calculator?

Enter the matrix and store it under a name, then use the name with the inverse key: the x-inverse key on the TI-84 Plus CE and the Casio fx-CG50, the Inverse Matrix command in the catalog on the fx-CG100, or the power -1 on the TI-Nspire. If the determinant is 0 there is no inverse and the calculator shows an error.

How do I solve Ax = b with a calculator?

Enter A and b as matrices, then calculate the inverse of A multiplied by b, with the inverse on the left. The answer is the column of values of the unknowns.

Why does my calculator say Dimension error?

The matrices have sizes that do not allow the operation. To add, the sizes must be the same. To multiply, the number of columns of the first must equal the number of rows of the second.

Do I write the calculator steps in my exam working?

No. Write the matrices, the method such as x = A inverse times b, and the results, and say you used your calculator. Examiners look for the method, not the key presses.