You are on page 1of 10

Matrices

Matrices are groupings of numbers. Each number in a matrix is called an element. Matrices have rows
(left to right) and columns (top to bottom). The size of a matrix is called by the number of rows then
the number of columns. For instance a 2x3 matrix has 2 rows and 3 columns, while a 3x2 matrix has 3
rows and 2 columns.

A= 
2 −1 14
3 −6 1   
−3 1
A= 5 2
2 8
A=  
2 5
3 6  
2 5 3
A= 3 6 1
4 8 2

2x3 Matrix 3x2 Matrix 2x2 Matrix 3x3 Matrix

A row matrix is a matrix that has only one row. A column matrix is a matrix that has only 1 column.
A square matrix is a matrix that has the same number of rows and columns.

Unit Matrix or Identity Matrix

Another special matrix is the unit matrix or identity matrix. A unit matrix is square matrix that is all
0's, except on the diagonals where there are 1's. A unit matrix has to be a square matrix, but can be any
size: 2 x 2, 3 x 3, 4 x 4, etc. The unit matrix is usually called I. The unit matrix is special because
when you multiply any matrix by the unit matrix, the matrix does not change. It is kind of like
multiplying by 1.

 
1 0 0 0
I =  1 I=  
1 0
0 1  
1 0 0
I= 0 1 0
0 0 1
I= 0
0
0
1
0
0
0
1
0
0
0
1

1x1 Unit Matrix 2x2 Unit Matrix 3x3 Unit Matrix 4x4 Unit Matrix

Adding and Subtracting Matrices

In order to add or subtract matrices, each matrix has to be the same size (it has to have the same
number of rows and columns). Add or subtract each element in the first matrix to the corresponding
element in the second matrix. The answer will be a matrix that has the same size as the 2 that were
added.

A=  2 −1 14
3 −6 1  
B= 3 5 −4
1 6 2  Find C = A + B


C= 23 −15 14−4
31 −66 12 
Matrices Study Guide 1 of 10
C=  5 4 10
4 0 3 
Multiplying Matrices

In order to multiply 2 matrices, the number of columns in the first matrix has to be the same as the
number of columns in the second matrix. The answer will be a matrix that has the number of rows
from the first matrix and the number of columns from the second matrix. You can not multiply a 2x3
matrix with a 2x2 matrix – the first matrix has 3 columns and the second matrix has 2 rows – they do
not match. You can multiply a 2x3 matrix with a 3x2 matrix – the first matrix has 3 columns and the
second matrix has 3 rows. The answer will be a 2x2 matrix because the first matrix has 2 rows and the
second matrix has 2 columns.

A=  30 −40 90
−25 −80 100  
10 15
B= 70 90
120 110  C=   
  
A is 2x3. 2 rows and 3 B is 3x2. 3 rows and 2 C = A * B. This is valid because the
columns columns number columns of A(3) matches the
number of rows of B (3). C is 2x2
because A has 2 rows and B has 2
columns.

To calculate the elements of matrix C, multiply the 1st row of A by the 1st column of B. This answer
goes in row 1, column 1 of C. Multiply the 1st row of A buy the 2nd column of B and put the answer in
row 1 column 2 of C. Multiply the 2nd row of A by the 1st column of B and put the answer in row 2
column 1 of C. Multiply the 2nd row of A by the 2nd column of B and put the answer in row 2, column 2
of C.

To multiply a row by a column multiply the 1st element in the row by the 1st element in the column,
then multiply the 2nd element in the row by the 2nd element in the column, then multiply the 3rd element
in the row by the 3rd element in the column, and so on. Add these results together. (This is why the
number of columns in A has to be the same as the number of rows in B, so that there will be the same
number of elements when we are multiplying.)

C=  30×10−40×7090×120 30×15−40×9090×110
−25×10−80×70100×120 −25×15−80×90100×110 

C= 300 −280010800  450 −36009900
−250 −560012000 −375 −720011000 
C=  8300 6750
6150 3425 
Determinant
You can only find the determinant of a square matrix. The procedure for finding the determinant is

Matrices Study Guide 2 of 10


slightly different for a 2x2 and a 3x3 matrix.

2x2 Determinant
The Determinant of a 2x2 matrix is calculated by multiplying the upper left element by the lower right
element and subtracting the product of the lower left element multiplied by the upper right element.

A=  
2 5
3 6

∣A∣= ∣ ∣
2 5
3 6
The determinant is written with straight lines to the left and right of the numbers.

∣A∣=2×6−3×5
∣A∣=12−15
∣A∣=−3

Cofactor

The cofactor of any element in a matrix is made up of all the elements that are not in the same row or
the same column as the element. To find the cofactor of any element, cover up the row and column
that the element is in. Then write a new matrix of the elements that are not covered.

Depending on the position of the element, you may need to change the sign of the cofactor according to
the following:

 
−
−  
− 
− −
− 
You need to change the sign of any cofactor that is in a position with a – . That means negative
numbers become positive and positive numbers become negative. For any cofactor that is in a position
with a +, you do not change the sign of the cofactor.

For a 3x3 matrix, each cofactor is really a 2x2 determinant, so you can calculate it to a single number
based on the method shown above for 2x2 determinant.

Matrices Study Guide 3 of 10


The cofactor of the upper right element (1) is
6 3
7 4 ∣ ∣ These are all the

elements that are not in the first row and not in the first column. This
evaluates out to 21. [ 6×4 – 7×3 = 24−21 = 3 ]

 
1 3 9
A= 2 6 3
8 7 4 The cofactor of the 3 in the 2nd row, 3rd column is −
1 3
8 7 ∣ ∣ These are

all the elements not in the 2nd row and not in the 3rd column. Because of
it's position in the matrix the sign needs to be changed. This evaluates out
to 17. [ −1×7−8×3 = −7−24 = −−17 = 17 ]

Matrix of Cofactors

The Matrix of Cofactors (abbreviated here as Ac) is a new matrix made up of the cofactors of each
element of the original matrix. The matrix of cofactors for a 3x3 matrix is another 3x3 matrix. To
make the matrix of cofactors, take the cofactor of every element in the matrix, evaluate the cofactor
down to a number, and put that number in the same position in the new matrix. Don't forget to change
the signs where necessary.

 
∣ 4 2
∣ ∣ ∣∣ ∣
3 −2

−1 2
2 −2
−1 4
2 3

1 3 2
A= −1 4 2
2 3 −2  Ac = − 3 2
3 −2 ∣ ∣ ∣ ∣ ∣ ∣1 2
2 −2
−1
2
3
3
3 2
4 2 ∣ ∣ ∣ ∣ ∣ ∣
− 1 2
−1 2
1
−1
3
4
Calculate the 2x2 determinant of each cofactor in the above matrix, being very careful with
signs and arithmetic.

 4×−2−3×2 −−1×−2−2×2 −1×3− 2×4


Ac = −3×−2−3×2
3×2−4×2
1×−2−2×2
−1×2−−1×2
−1×3− 2×3
1×4−−1×3 
 −8−6
Ac = −−6−6
−2−4
−2−4 
6−8 − 2−−2
−3−8
−3−6
4−−3 
 
−14 −−2 −11
Ac = −−12 −6 −−3
−2 −4 7
The result is the matrix of cofactors:

Matrices Study Guide 4 of 10



−14 2 −11
Ac = 12 −6
−2 −4
3
7 
Adjoint

The Adjoint of the matrix A (referred to here as Adj A) is the Transpose of the Matrix of Cofactors. To
Transpose a matrix, you change the first column of the original matrix to be the first row of the
transposed matrix. The second column becomes the second row, and so on.

To get the Adjoint of a matrix, find the matrix of cofactors (Ac), then transpose it.

1 3 2
A= −1 4 2
2 3 −2   −14 2 −11
Ac = 12 −6 3
−2 −4 7  Adj A=
 −14 12 −2
2 −6 −4
−11 3 7

In Ac above, the first row is -14, 2, and -11. In Adj A, the first column is -14, 2, and -11.
The second row in Ac is 12, -6, and 3. The second column in Adj A is 12, -6, and 3.
The third row in Ac is -2, -4 and 7. The third column in Adj A is -2, -4, and 7.

3x3 Determinant
The Determinant of 3x3 matrix is found by first multiplying each element in the first row by it's
cofactor. Remember that the cofactors are calculated to a single number by taking the 2x2 determinant
of each cofactor. Then subtract the 2nd product from the first and add the 3rd.

 
1 3 2
A= −1 4 2
2 3 −2

∣A∣=1× ∣ 4 2
3 −2∣− 3×
−1 2
2 −2 ∣
 2× ∣
−1 4
2 3 ∣ ∣
∣A∣=1× 4×−2−3×2 − 3×−1×−2− 2×2  2×−1×3−2×4
∣A∣=1×−8−6 − 3×2−4  2×−3−8
∣A∣=1×−14 − 3×−2  2×−11
∣A∣= −14 − −6  −22
∣A∣=−30

Inverse

The inverse of a matrix is a matrix that when multiplied by the original matrix equals the unit matrix.
1 1
It is kind of like the reciprocal of a scalar number. The reciprocal of 3 is , and 3× =1.
3 3
Likewise , the inverse of A is A-1, and A×A−1=I.

Matrices Study Guide 5 of 10


Finding the inverse of a matrix involves a lot of the things described above. To find the Inverse of a
Matrix A:
1. Find the Determinant of the Matrix, ∣A∣ .
2. Find the Matrix of Cofactors, Ac
3. Find the Adjoint (Adj A) by taking the Transpose of the Matrix of Cofactors
4. The Inverse (A-1) is the reciprocal of the determinant multiplied by the Adjoint
1
A−1= Adj A
∣A∣

Lets find the inverse of this 3x3 matrix

 
1 3 2
A= −1 4 2
2 3 −2

1. Find the Determinant:


1 3 2
A= −1 4 2
2 3 −2

∣A∣=1× ∣ 4 2
3 −2∣− 3×
−1 2
2 −2∣ 2×∣−1 4
2 3 ∣ ∣
∣A∣=1× 4×−2−3×2 − 3×−1×−2− 2×2  2×−1×3−2×4
∣A∣=1×−8−6 − 3×2−4  2×−3−8
∣A∣=1×−14 − 3×−2  2×−11
∣A∣= −14 − −6  −22
∣A∣=−30

2. Find the Matrix of Cofactors

 

4 2
3 −2 ∣ ∣ ∣∣ ∣ − −1 2
2 −2
−1
2
4
3
Ac = − 3 2
3 −2 ∣ ∣ ∣ ∣ ∣ ∣ 1 2
2 −2
−1
2
3
3

∣ ∣ ∣ ∣ ∣ ∣
3 2
4 2
− 1 2
−1 2
1 3
−1 4

 4×−2−3×2 −−1×−2−2×2 −1×3− 2×4


Ac = −3×−2−3×2
3×2−4×2
1×−2−2×2
−1×2−−1×2
−1×3− 2×3
1×4−−1×3 
Matrices Study Guide 6 of 10
 −8−6
Ac = −−6−6
−2−4
−2−4 
6−8 − 2−−2
−3−8
−3−6
4−−3 
 
−14 −−2 −11
Ac = −−12 −6 −−3
−2 −4 7


−14 2 −11
Ac = 12 −6
−2 −4
3
7 
3. Find the Adjoint

Adj A=
 −14 12 −2
2 −6 −4
−11 3 7 
4. Find the Inverse

A−1=−
30 
1 −14 12 −2
2 −6 −4
−11 3 7 

Matrices Study Guide 7 of 10


Solving Simultaneous Equations with Matrices

You can use matrices and matrix math to solve a system of simultaneous equations.

3x – 2y=8
−4x5y=−13

The first step is to re-write the equations as matrices. The coefficients of x and y go in the first matrix
A. A will be a 2 x 2 matrix since we have 2 variables and 2 equations:

A= 3 −2
−4 5 
The variables x and y go in the matrix X which is a 2 x 1 matrix:
X= x
y 
The answers go in another 2 x 1 matrix B:
B=
 −138 
The equations can be re-written as 1 equation with these matrices:
A X =B A times X = B
Remember that any matrix times its inverse is the unit matrix. So if we multiply the left side by A-1 we
get X times the unit matrix. And multiplying a matrix by the unit matrix leaves that matrix unchanged,
so on the left we have only X. Since we multiplied the left side by A-1 we have to multiply the right by
the same thing:
A X =B
A−1× A X = A−1×B Multiply both sides by A-1
I X =A B
−1
A x A-1 = I, the unit matrix
X =A−1 B I x X = X since the unit matrix doesn't change another matrix
So by multiplying the inverse of A by B we find the matrix X. X consists of our 2 unknown variables,
so we've solved for x and y.

Find A-1,
Determinant: Matrix of Cofactors
∣A∣=3×5−−4×−2
∣A∣=15−8=7
Ac =  
5 4
2 3

Adjoint: Inverse:

Adj A=   5 2
4 3
−1
A =  
1 5 2
7 4 3

Matrices Study Guide 8 of 10


Now multiply the inverse by B X =A−1 B :

X=   
1 5 2 8
7 4 3 −13
1 5×8  2×−13
X=
 
7 4×8  3×−13
1
7  32  −39 
X = 40  −26

1
7  −7
X = 14

X = 2 
−1

At the beginning we said that X =


x
y , so:

x=2 y=−1

The procedure is the same for 3 x 3 Matrices:


2x – y3z=11
4x2y – 7z=8
−x3y – 2z=1


A= 4
2 −1 3
2 −7
−1 3 −2
   
x
X= y
z
11
B= 8
1
A× X =B

Find A-1:

∣A∣=2 × ∣ 2 −7
3 −2∣− −1 ×∣ 4 −7
−1 −2
 3× ∣4 −2
−1 3 ∣ ∣
∣A∣=2 ×  2×−2−3×−7 − −1 ×  4×−2−−1×−7  3 ×  4×3−−1×2
∣A∣=2 × −4−−21 − −1 × −8−7  3 × 12−−2
∣A∣=2 × 17 − −1 × −15  3 × 14
∣A∣=34−1542
∣A∣=61

Matrices Study Guide 9 of 10


Find Matrix of Cofactors (Ac):

 
∣ 2 −7
3 −2∣ ∣−
4 −7
−1 −2 ∣ ∣ 4 2
−1 3 ∣

Ac = − −1 3
3 −2 ∣ ∣ 2
−1 −2
3
∣ ∣
− 2 −1
−1 3 ∣

−1 3
2 −7 ∣ ∣ −2 3
4 −7 ∣ ∣ 2 −1
4 2 ∣

2×−2−3×−7 − 4×−2−−1×−7
Ac = −−1×−2−3×3
−1×−7−2×3
4×3−−1×2
2×−2−−1×3 −2×3−−1×−1
−2×−7− 4×3 2×2−4×−1 
Ac =
 −4−−21 −−8−7 12−−2
−2−9
7−6
−4−−3 −6−1
−−14−12 4−−4 
17
Ac = −−7
1
−−15 14
−1 −5
−−26 8 

17 15 14
Ac = 7 −1 −5
1 26 8 
Transpose to find Adjoint
17 7
 1
Adj A= 15 −1 26
14 −5 8

A−1=
61 
1 17 7 1
15 −1 26
14 −5 8 
X =A−1×B Solve for X:

X=
61    
1 17 7 1 11
15 −1 26 8
14 −5 8 1
=
1 187561
61
165−826
154−408 
  
1 244 4
X= 183 X= 3
61
112 2
x= 4 y=3 z =2

Matrices Study Guide 10 of 10