"

16. Matrices

A matrix is an ordered array of numbers or pronumerals. Matrices are extensively used in mathematics and physics. A sound understanding of matrices is essential for a wide range of real-world applications, like machine learning, computer graphics, natural language processing, robotics, image processing, urban planning and infrastructure development.

In this chapter we discuss:

  • types of matrices;
  • addition, subtraction, and multiplication of matrices;
  • determinants of matrices and
  • matrix inverses.

Do you need this chapter?

Here are some questions on the topics in this chapter to consider. If you can do these, you may skip this chapter.

Quiz: Matrices

Let [latex]A=\left[\begin{array}{cc} 1 & 3\\ 2 & -1 \end{array}\right][/latex] and [latex]B=\left[\begin{array}{cc} 0& -2\\ 1 & 5 \end{array}\right][/latex]

1. Find the value of [latex]2A-B[/latex]

a) [latex]\left[\begin{array}{cc} 2 & 10\\ 2 & -12 \end{array}\right][/latex]

b) [latex]\left[\begin{array}{cc} 2 & 6\\ 3 & -3 \end{array}\right][/latex]

c) [latex]\left[\begin{array}{cc} 2& 4\\ 3 & 3 \end{array}\right][/latex]

d) [latex]\left[\begin{array}{cc} 2 & 8\\ 3 & -7 \end{array}\right][/latex]

e) None of these.

Answer

d)

 

2. Find [latex]BA[/latex]

a) [latex]BA=\left[\begin{array}{cc} -4 & 2\\ 11 & -2 \end{array}\right][/latex]

b) [latex]BA=\left[\begin{array}{cc} 0&-6\\ 2 & -5 \end{array}\right][/latex]

c) [latex]BA=\left[\begin{array}{cc} 3 & 13\\ -1 & -9 \end{array}\right][/latex]

d) [latex]BA=\left[\begin{array}{cc} 1 & 1\\ 3 & 4 \end{array}\right][/latex]

e) None of these.

Answer

a)

 

3. What is the determinant of [latex]B[/latex] ?

a) -2

b) 3

c) 2

d) -5

e) -10

Answer

c)

 

4. If [latex]G=\left[\begin{array}{cc} 3 & -1\\ -4 & 1\\ -5 & 9 \end{array}\right][/latex] then for which of the following matrices [latex]H[/latex] is the operation [latex]GH[/latex] possible?

a) [latex]H=\left[\begin{array}{cc} 1 \\ 2d \end{array}\right][/latex]

b) [latex]H=\left[\begin{array}{cc} 1 & 2 \end{array}\right][/latex]

c) [latex]H=\left[\begin{array}{ccc} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{array}\right][/latex]

d) [latex]H=\left[\begin{array}{ccc} 1 & 2 & 0 \\ 3 & 4 & 1 \end{array}\right][/latex]

e) [latex]H=\left[\begin{array}{ccc} 1  \\ 2  \\ 3 \end{array}\right][/latex]

Answer

a) and d)

 

5. If the matrix [latex]P=\left[\begin{array}{ccc} 0 & 1 \\ a & 4 \end{array}\right][/latex] has a determinant of [latex]-12[/latex], find the value of [latex]a[/latex].

a) 0

b) 4

c) -12

d) 12

e) 7

Answer

c)

 

6. The matrix equation

\begin{align*}\left[\begin{array}{cc}
3 & -1\\
1 & 2
\end{array}\right] \left[ \begin{array}{c}
x\\
y
\end{array}\right]
&= \left[ \begin{array}{c}
7\\
0
\end{array}\right]
\end{align*}

could be used to solve which set of equations

a) [latex]3x+y=7[/latex] and [latex]x+2y=0[/latex]

b) [latex]3x-y=7[/latex] and [latex]x+2y=0[/latex]

c) [latex]x-2y=0[/latex] and [latex]3x=7y-1[/latex]

d) [latex]x+2y=0[/latex] and [latex]3x-y=7[/latex]

e) None of these.

Answer

b)

 

7. Which set of equations may be written as

\begin{align*}
\left[\begin{array}{ccc}
1 & 2 & 0\\
3 & -1 & 1\\
0 & 1 & 4
\end{array}\right] & \left[\begin{array}{c}
x\\
y\\
z
\end{array}\right]=\left[\begin{array}{c}
5\\
1\\
14
\end{array}\right]\ ?
\end{align*}

a) [latex]x+2y=-5, \quad 3x-y+z=-1, \quad y+4z=-14[/latex]

b) [latex]x+2y=5, \quad 3x-y+z=-1, \quad y+4z=14[/latex]

c) [latex]x+2y=5, \quad 3x-y+z=1, \quad y+4z=14[/latex]

d) [latex]x-2y=5, \quad 3x+y+z=1, \quad -y+4z=14[/latex]

e) None of these.

Answer

c)

 

8. What is the value of [latex]x[/latex] if the matrix [latex]A=\left[\begin{array}{cc} 1 & 2\\ x & 4 \end{array}\right][/latex] has no inverse?

a) [latex]0[/latex]

b) [latex]-2[/latex]

c) [latex]-1[/latex]

d) [latex]2[/latex]

e) [latex]1[/latex]

Answer

d)

 

9. Find the inverse of the matrix

\begin{align*}
A&=\left[ \begin{array}{ccc}
3 & 2\\
10 & -4  \end{array} \right].
\end{align*}

Answer

[latex]\dfrac{1}{32}\left[ \begin{array}{ccc} 4 & 2\\ 10 & -3 \end{array}\right][/latex].

 

10. Using the answer to 9) above, solve the equations

\begin{align*}
3x+2y&=-1\\
10x-4y&=18
\end{align*}

Answer

[latex]x=1[/latex] and [latex]y=-2[/latex].

Introduction

Matrices are arrays of numbers or pronumerals arranged in rows and columns. Here are some examples of matrices.

\begin{align*}A & =\left[\begin{array}{ccc}
2 & 5 \\
5 & 3
\end{array}\right] & B & =\left[\begin{array}{ccc}
2 & 5 & 7\\
5 & a & 1\\
2 & 0 & -2
\end{array}\right] & C & =\left[\begin{array}{ccc}
2 & 5 \\
-7 & -1\\
2 & 0 \\
0 & 4\\
\end{array}\right] \\
D & =\left(\begin{array}{ccc}
2  &-1\\
-5 & x^2
\end{array}\right) & E& =\{\begin{array}{ccc}
u & v & w
\end{array}\} & F& =\left\{ \begin{array}{c}
3\\
5 \\
2
\end{array} \right\}
\end{align*}

There are a few key features of matrices that you should understand:

  • A matrix is a rectangular array of elements. The elements may be numbers, pronumerals or mathematical expressions.
  • Matrices are usually denoted by upper case letters.
  • The elements are usually written within brackets.
  • The order or shape of the matrix is determined by the number of rows and columns of the matrix. The number of rows is always given first, then the number of columns.

Consider the matrix:

\begin{align*}A=\left[\begin{array}{ccc}
1 & 2 & -9\\
2 & 5 & -3\\
\end{array}\right].
\end{align*}

Matrix [latex]A[/latex] has [latex]2[/latex] rows and [latex]3[/latex] columns. It's order is written [latex]2\times 3[/latex] or [latex]2[/latex] by [latex]4[/latex]. We call [latex]A[/latex] a [latex]2[/latex] by [latex]3[/latex] matrix.

A [latex]1 \times 1[/latex] matrix is [latex]\begin{align*} \left[\begin{array}{cc} a \end{array}\right] \end{align*}[/latex] where [latex]a \in \mathbb{R}[/latex]. Note that it is necessary to include the brackets even for [latex]1\times 1[/latex] matrices.

Square matrix

A square matrix has the same number of rows as columns. The matrix

\begin{align*}
A & =\left[\begin{array}{cc}
2 & -1\\
0 & 4
\end{array}\right]
\end{align*}

is a square [latex]2[/latex] by [latex]2[/latex] matrix. It's order is [latex]2\times 2[/latex]. An example of a square 3 by 3 matrix is

\begin{align*}
C=\left[\begin{array}{ccc}
0 & 1 & 2\\
3 & 4 & -1\\
a & 1 & 0
\end{array}\right].
\end{align*}

 

Exercises: Matrix orders

State the order of the following matrices:

a) [latex]\left[\begin{array}{ccc} 7 & -5 & 0\\ 6 & 2 & -1 \end{array}\right][/latex]

b) [latex]P=\left[\begin{array}{ccc} 0 & 1 \\ 3 & 4 \end{array}\right][/latex]

c) [latex]P=\left[\begin{array}{ccc} 2\\ -4\\ 1\\ 1 \end{array}\right][/latex]

d) [latex]P=\left[\begin{array}{ccc} 1 & 1 \\ 3 & 0\\ -2 & 3 \end{array}\right].[/latex]

e) [latex]P=\left[\begin{array}{ccc} 1 & 1 & 3 & 0 & -7\\ \end{array}\right].[/latex]

 

Answers:

a) [latex]2\times 3[/latex]   b) [latex]2\times 2[/latex]   c) [latex]4\times 1[/latex]   d) [latex]3\times 2[/latex]   e) [latex]1\times 5[/latex]

Equal matrices

Two matrices are equal if they have the same order and their corresponding elements are equal.

Consider the matrices:

\begin{align*}
A=\left[\begin{array}{ccc}
2& 5 & b\\5 & 3 & 1\\2 & 0 & -2
\end{array}\right]
\qquad B=\left[\begin{array}{ccc}
2 & 5 & 7\\5 & a & 1\\2 & 0 & -2
\end{array}\right].
\end{align*}

If [latex]a=3[/latex] and [latex]b=7[/latex] then [latex]A[/latex] and [latex]B[/latex] are equal.

Examples: Equal matrices

1.   Are the following two matrices equal?

\begin{align*}
P&=\left[\begin{array}{ccc}
0 & 1 \\
3 & 4
\end{array}\right] \qquad
Q=\left[\begin{array}{ccc}
0 & -1 \\
-3 & -4
\end{array}\right].
\end{align*}

Solution:

The corresponding elements in [latex]P[/latex] and [latex]Q[/latex] are not equal so the matrices [latex]P[/latex] and [latex]Q[/latex] are not equal.

2. The matrices

\begin{align*}
P&=\left[\begin{array}{ccc}
1  \\
2 \\
3
\end{array}\right] \quad \text{and} \quad
Q=\left[\begin{array}{ccc}
1 & 2 & 3 \\
\end{array}\right].
\end{align*}

have different orders and so are not equal

3. The matrices

\begin{align*}
P&=\left[\begin{array}{ccc}
1  & 2 & 3\\
4 & 5 & 6\\
7 & 8 & 9
\end{array}\right] \quad \text{and} \quad
Q=\left[\begin{array}{ccc}
1  & 2 & 3\\
7 & 8 & 9\\
4 & 5 & 6
\end{array}\right]
\end{align*}

do not have the same corresponding elements and so are not equal.

 

Addition and subtraction of matrices

Matrices of the same order (or shape) may be added or subtracted. Two matrices A and B of the same order are added by adding their corresponding elements.

Consider the following matrices:

\begin{align*}
A =\left[\begin{array}{ccc}
3 & 2 & -1\\
1 & 5 & -4\\
\end{array}\right]
\qquad
B =\left[\begin{array}{ccc}
1 & 0 & 2\\
3 & 1 & -2\\
\end{array}\right]
\qquad
C  =\left[\begin{array}{ccc}
2& -3 \\
4 & 3
\end{array}\right].
\end{align*}

Notice that matrices [latex]A[/latex] and [latex]B[/latex] are [latex]2\times 3[/latex] whereas [latex]C[/latex] is [latex]2 \times2[/latex]. It is not possible to create [latex]A+C[/latex] or [latex]B+C[/latex] as they are of different order.

We add [latex]A[/latex] and [latex]B[/latex] together as follows:

\begin{align*}
A+B &=\left[\begin{array}{ccc}
3 & 2 & -1\\
1 & 5 & -4\\
\end{array}\right]+
\left[\begin{array}{ccc}
1 & 0 & 2\\
3 & 1 & -2\\
\end{array}\right] \\
&=\left[\begin{array}{ccc}
3+1 & 2+0 & -1+2 \\
1+3 & 5+1 & -4+\left(-2 \right)
\end{array}\right]\\
&=\left[\begin{array}{ccc}
4 & 2 & 1 \\
4 & 6 & -6
\end{array}\right].\\
\end{align*}

Note that addition is performed by adding the corresponding elements of each matrix. Note also that [latex]A+B=B+A[/latex].

Similarly, subtraction is performed by subtracting the corresponding element of each matrix. For example,

\begin{align*}
A-B &=\left[\begin{array}{ccc}
3 & 2 & -1\\
1 & 5 & -4\\
\end{array}\right]-
\left[\begin{array}{ccc}
1 & 0 & 2\\
3 & 1 & -2\\
\end{array}\right] \\
&=\left[\begin{array}{ccc}
3-1 & 2-0 & -1-2 \\
1-3 & 5-1 & -4-\left(-2 \right)
\end{array}\right]\\
&=\left[\begin{array}{ccc}
2 & 2 & -3 \\
-2 & 4 & -2
\end{array}\right].\\
\end{align*}

Note that [latex]A-C\neq C-A[/latex].

The Zero matrix

A zero matrix has all of its elements equal to zero.

A matrix subtracted from itself gives a zero matrix. For example,

\begin{align*}
A-A &=\left[\begin{array}{ccc}
3 & 2 & -1\\
1 & 5 & -4\\
\end{array}\right]-
\left[\begin{array}{ccc}
3 & 2 & -1\\
1 & 5 & -4\\
\end{array}\right] \\
&=\left[\begin{array}{ccc}
3-3 & 2-2 & -1-\left(-1 \right) \\
1-1 & 5-5 & -4-\left(-4 \right)
\end{array}\right]\\
&=\left[\begin{array}{ccc}
0 & 0 & 0 \\
0 & 0 & 0
\end{array}\right].\\
\end{align*}

Note that it is incorrect to write

\begin{align*}
A-A &=\left[\begin{array}{ccc}
3 & 2 & -1\\
1 & 5 & -4\\
\end{array}\right]-
\left[\begin{array}{ccc}
3 & 2 & -1\\
1 & 5 & -4\\
\end{array}\right] \\
&=\left[\begin{array}{ccc}
3-3 & 2-2 & -1-\left(-1 \right) \\
1-1 & 5-5 & -4-\left(-4 \right)
\end{array}\right]\\
&=0\\
\end{align*}

because [latex]0[/latex] is a number not a matrix.

 

 

Examples: Addition and subtraction of matrices

1. For the following matrices:

\begin{align*}
P&=\left[\begin{array}{ccc}
0 & 1 \\
3 & 4
\end{array}\right] \qquad
Q=\left[\begin{array}{ccc}
1 & -2 \\
-3 & 4
\end{array}\right].
\end{align*}

find a) [latex]P+Q[/latex]  and b) [latex]Q-P[/latex].

Solution a) 

\begin{align*}
P+Q&=\left[\begin{array}{ccc}
0 & 1 \\
3 & 4
\end{array}\right] +
\left[\begin{array}{ccc}
1 & -2\\
-3 & 4
\end{array}\right]\\
&=\left[\begin{array}{ccc}
0+1 & 1-2\\
3-3 & 4+4
\end{array}\right]\\
&=\left[\begin{array}{ccc}
1 & -1\\
0 & 8
\end{array}\right].\\
\end{align*}

Solution b)

\begin{align*}
Q-P&=\left[\begin{array}{ccc}
1 & -2\\
-3 & 4
\end{array}\right] -
\left[\begin{array}{ccc}
0 & 1 \\
3 & 4
\end{array}\right]\\
&=\left[\begin{array}{ccc}
1-0& -2-1\\
-3-3 & 4-4
\end{array}\right]\\
&=\left[\begin{array}{ccc}
1 & -3\\
-6 & 0
\end{array}\right].\\
\end{align*}

2. Add the following matrices:

\begin{align*}
A&=\left[\begin{array}{ccc}
3 & 0 & 1 \\
-2 & 0 & -7\\
1 & 2 & -2
\end{array}\right] \qquad
B=\left[\begin{array}{ccc}
0 & 3 & -2 \\
1 & 4 & 5\\
8 & 0 & 2\\
\end{array}\right].
\end{align*}

Solution:

\begin{align*}
A+B&=\left[\begin{array}{ccc}
3 & 0 & 1 \\
-2 & 0 & -7\\
1 & 2 & -2
\end{array}\right] +
\left[\begin{array}{ccc}
0 & 3 & -2 \\
1 & 4 & 5\\
8 & 0 & 2\\
\end{array}\right]\\
&=\left[\begin{array}{ccc}
3+0 & 0+3 & 1+\left(-2 \right) \\
-2+1 & 0+4 & -7+5\\
1+8 & 2+0 & -2+2
\end{array}\right] \\
&=
\left[\begin{array}{ccc}
3 & 3 & -1 \\
-1 & 4 & -2\\
9 & 2 & 0
\end{array}\right].
\end{align*}

3. The following matrices cannot be added or subtracted because they have different orders.

\begin{align*}
A&=\left[\begin{array}{ccc}
0 & 3 \\
1 & 4
\end{array}\right] \qquad
B=\left[\begin{array}{ccc}
0 & 3 & -2 \\
1 & 4 & 5\\
8 & 0 & 2\\
\end{array}\right].
\end{align*}

4. Let

\begin{align*}
A&=\left[\begin{array}{ccc}
7 & 3 \\
1 & -5
\end{array}\right].
\end{align*}

Find [latex]A-A[/latex].

Solution:

\begin{align*}
A-A&=\left[\begin{array}{ccc}
7 & 3 \\
1 & -5
\end{array}\right]-
\left[\begin{array}{ccc}
7 & 3 \\
1 & -5
\end{array}\right]\\
&=\left[\begin{array}{ccc}
7-7 & 3-3 \\
1-1 & -5-\left(-5 \right)
\end{array}\right]\\
&=\left[\begin{array}{ccc}
0 & 0 \\
0 & 0
\end{array}\right].
\end{align*}

Hence [latex]A-A[/latex] is equal to the [latex]2\times 2[/latex] zero matrix not [latex]0[/latex].

Here are some exercises to try.

Exercises: Addition and subtraction of matrices

1. For the following matrices,

\begin{align*}A & =\left[\begin{array}{ccc}
2 & 5 \\
5 & 3
\end{array}\right] & B & =\left[\begin{array}{ccc}
1 & 5 \\
0 & -2
\end{array}\right] & C & =\left[\begin{array}{ccc}
2 & 5 \\
-7 & -1\\
2 & 0 \\
0 & 4\\
\end{array}\right] \\
D & =\left[\begin{array}{ccc}
1 & 2 \\
1 & -1\\
3 & 9 \\
1 & -4\\
\end{array}\right],
\end{align*}

find a) [latex]A+B[/latex]    b) [latex]C-D[/latex].

Answers:

a)[latex]\left[\begin{array}{ccc} 3 & 10\\ 5 & 1 \end{array}\right]\qquad \text{b)} \left[\begin{array}{ccc} 1 & 3\\ -8 & 0\\ -1 & -9\\ -1 & 8 \end{array}\right][/latex]

Elements of a matrix

We denote each element of a matrix [latex]A[/latex] by [latex]a_{ij}[/latex]. The element [latex]a_{ij}[/latex] is the element of the matrix in the [latex]i[/latex]th row and [latex]j[/latex]th column of [latex]A[/latex]. For the [latex]3\times 3[/latex] matrix the elements are denoted as below:

\begin{align*}
A&=\left[\begin{array}{ccc}
a_{11} & a_{12} & a_{13}\\
a_{21} & a_{22} & a_{23}\\
a_{31} & a_{32} & a_{33}
\end{array}\right].
\end{align*}

For the matrix

\begin{align*}
B&=\left[\begin{array}{ccc}
1 & -4 & 2\\
4 & 5 & 6\\
\end{array}\right],
\end{align*}

we have [latex]b_{11}=1,[/latex] [latex]b_{12}=-4,[/latex] [latex]b_{13}=2,[/latex] [latex]b_{21}=4,[/latex] [latex]b_{22}=5[/latex] and [latex]b_{23}=6[/latex].

Scalar multiplication

Any matrix may be multiplied by a scalar, [latex]k[/latex]. This is done by multiplying each element of the matrix by [latex]k[/latex].  For a [latex]2[/latex] by [latex]3[/latex] matrix [latex]A[/latex] we have:

\begin{align*}
kA&=k\left[\begin{array}{ccc}
a_{11} & a_{12} & a_{13}\\
a_{21} & a_{22} & a_{23}\\
\end{array}\right]\\
&=\left[\begin{array}{ccc}
ka_{11} & ka_{12} & ka_{13}\\
ka_{21} & ka_{22} & ka_{23}\\
\end{array}\right].\\
\end{align*}

 

Examples: Scalar multiplication

1. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 & 5 \\
1 & 0
\end{array}\right].
\end{align*}

Evaluate 3A.

Solution:

\begin{align*}3A & =3\left[\begin{array}{ccc}
2 & 5 \\
1 & 0
\end{array}\right]\\
&=\left[\begin{array}{ccc}
3\times 2 & 3\times 5 \\
3\times 1 & 3\times 0
\end{array}\right]\\
&=\left[\begin{array}{ccc}
6 & 15 \\
3 & 0
\end{array}\right].
\end{align*}

2. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 & 5 \\
1 & 0\\
-2 & 7
\end{array}\right]\quad \text{and}\quad
B =\left[\begin{array}{ccc}
0 &-5 \\
1 & 3 \\
0 & 2
\end{array}\right].\
\end{align*}

Determine [latex]2A-3B[/latex].

Solution:

We have

\begin{align*}2A-3B & =2\left[\begin{array}{ccc}
2 & 5 \\
1 & 0\\
-2 & 7
\end{array}\right]-
3\left[\begin{array}{ccc}
0 &-5 \\
1 & 3 \\
0 & 2
\end{array}\right]\\
&=\left[\begin{array}{ccc}
4 & 10 \\
2 & 0\\
-4 & 14
\end{array}\right]-
\left[\begin{array}{ccc}
0 &-15 \\
3 & 9 \\
0 & 6
\end{array}\right]\\
&=\left[\begin{array}{ccc}
4 & 25 \\
-1 & -9\\
-4 & 8
\end{array}\right].
\end{align*}

Here are some exercises to try.

Exercises: Scalar multiplication

1. Let

\begin{align*}C & =\left[\begin{array}{ccc}
2 & 5 & 1 \\
1 & 1 & 0\\
-2 & 4 & 6
\end{array}\right]\quad \text{and}\quad
D =\left[\begin{array}{ccc}
0 &-5 \\
1 & 3
\end{array}\right].\
\end{align*}

Find a) [latex]3C[/latex] and b) [latex]-2D[/latex].

Answer

1a) [latex]\left[\begin{array}{ccc} 6 & 15 & 3 \\ 3 & 3 & 0\\ -6 & 12 & 18 \end{array}\right] \qquad \text{b)} \left[\begin{array}{ccc} 0 & 10 \\ -2 & -6 \end{array} \right][/latex]

 

Special matrices

The Unit matrix

A unit (or identity) matrix is a square matrix with diagonal elements equal to [latex]1[/latex] and all other elements equal to [latex]0[/latex].

The unit matrix is usually denoted by [latex]I[/latex]. Sometimes the number of rows is indicated by a subscript. For example, [latex]I_3[/latex] is a [latex]3 \times 3[/latex] unit matrix and

\begin{align*}
I_3 & =\left[\begin{array}{ccc}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 1
\end{array}\right].
\end{align*}

A [latex]2\times 2[/latex] identity matrix is denoted as [latex]I_2[/latex] and

\begin{align*}
I_2 & =\left[\begin{array}{ccc}
1 & 0 \\
0 & 1
\end{array}\right].
\end{align*}

Row matrix

A matrix with one row is called a row matrix or a row vector. It is common to use curly brackets with row matrices, but any bracket is correct. For example:

\begin{align*}
A & =\left[\begin{array}{ccc}
-2 & 1 & 0 &7 \\
\end{array}\right]=\left\{\begin{array}{ccc}
-2 & 1 & 0 &7 \\
\end{array}\right\}=\left(\begin{array}{ccc}
-2 & 1 & 0 &7 \\
\end{array}\right)
\end{align*}

is a [latex]1\times 4[/latex] row matrix.

Column matrix

A matrix with one column is called a column matrix or a column vector. For example:

\begin{align*}
A & =\left\{\begin{array}{ccc}
-2 \\
1 \\
0 \\
7 \\
\end{array}\right\}=\left[\begin{array}{ccc}
-2 \\
1 \\
0 \\
7 \\
\end{array}\right]=\left(\begin{array}{ccc}
-2 \\
1 \\
0 \\
7 \\
\end{array}\right)
\end{align*}

is a [latex]4 \times 1[/latex]column matrix.

Zero matrix

A zero matrix has all elements equal to zero. For example

\begin{align*}
A & =\left[\begin{array}{ccc}
0 & 0 & 0 &0 \\
\end{array}\right]=\left\{\begin{array}{ccc}
0 & 0& 0 & 0 \\
\end{array}\right\}=\left(\begin{array}{ccc}
0 & 0 & 0 & 0 \\
\end{array}\right)
\end{align*}

is a [latex]1\times 4[/latex] zero matrix. The matrix

\begin{align*}
B & =\left[\begin{array}{ccc}
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{array}\right]
\end{align*}

is a [latex]3\times 3[/latex] zero matrix.

Transpose of a matrix

The transpose of a matrix [latex]A[/latex] is denoted by [latex]A^\text{T}[/latex] and is obtained by interchanging the rows and columns of [latex]A[/latex]. For example, the matrix

\begin{align*}
A & =\left[\begin{array}{ccc}
1 & 3  \\
5 & 7
\end{array}\right]
\end{align*}

has the transpose

\begin{align*}
A^\text{T} & =\left[\begin{array}{ccc}
1 & 5  \\
3 & 7
\end{array}\right].
\end{align*}

The matrix

\begin{align*}
B & =\left[\begin{array}{ccc}
1 & 5 & 9 \\
3 & 7 & -12
\end{array}\right]
\end{align*}

has the transpose

\begin{align*}
B^\text{T} & =\left[\begin{array}{ccc}
1 & 3 \\
5 & 7 \\
9 & -12
\end{array}\right].
\end{align*}

Note that when finding the transpose, the first row of the matrix becomes the first column in its transpose. The second column becomes the second column in the transpose and so on.

Symmetric matrix

A symmetric matrix is a square matrix that is equal to its transpose. For example, the matrix

\begin{align*}
B& =\left[\begin{array}{ccc}
3 & 1 & -3 \\
1 & 5 & 7 \\
-3 & 7 & 10
\end{array}\right]
\end{align*}

is symmetric because

\begin{align*}
B^\text{T} & =\left[\begin{array}{ccc}
3 & 1 & -3 \\
1 & 5 & 7 \\
-3 & 7 & 10
\end{array}\right]^\text{T}\\
&=\left[\begin{array}{ccc}
3 & 1 & -3 \\
1 & 5 & 7 \\
-3 & 7 & 10
\end{array}\right]\\
&=B.
\end{align*}

 

Examples: Transpose of a matrix

1. Find the transpose of the following matrices.

\begin{align*}\text{1a) }A & =\left[\begin{array}{ccc}
2 & 5 \\
-5 & 3
\end{array}\right] & \text{b) }B & =\left[\begin{array}{ccc}
2 & -5 & 7\\
5 & a & 1\\
-2 & 0 & -2
\end{array}\right] & \text{c) }C & =\left[\begin{array}{ccc}
2 & 5 \\
-7 & -1\\
2 & 0 \\
0 & 4\\
\end{array}\right] \\
\text{d) }D & =\left(\begin{array}{ccc}
a  &b\\
c & d
\end{array}\right) & \text{e) }E& =\left\{\begin{array}{ccc}
u & v & w
\end{array}\right\} & \text{f) }F& =\left\{ \begin{array}{c}
3\\
5 \\
2
\end{array} \right\}
\end{align*}

Answers:

\begin{align*}\text{1a) }A^\text{T} & =\left[\begin{array}{ccc}
2 & -5 \\
5 & 3
\end{array}\right] & \text{1b) }B^\text{T} & =\left[\begin{array}{ccc}
2 & 5 & -2\\
-5 & a & 0\\
7 & 1 & -2
\end{array}\right] & \text{1c) }C^\text{T} & =\left[\begin{array}{ccc}
2 & -7 & 2 & 0 \\
5 & -1 & 0 & 4
\end{array}\right] \\
\text{1d) }D^\text{T} & =\left(\begin{array}{ccc}
a  &c\\
b & d
\end{array}\right) & \text{1e) }E^\text{T} & =\left\{\begin{array}{ccc}
u \\
v\\
w
\end{array}\right\} & \text{1f) }F^\text{T} & =\left\{ \begin{array}{c}
3 & 5 & 2\\
\end{array} \right\}
\end{align*}

Matrix multiplication

When multiplying two matrices [latex]A[/latex] and [latex]B[/latex], we often omit the multiplication sign and simply write the matrices in the order they are multiplied. So

\begin{align*}
A\times B&=AB.
\end{align*}

Two matrices can be multiplied if the number of columns of the first matrix is the same as the number of rows of the second matrix. If this is not the case, the multiplication is undefined. The result of the multiplication is another matrix with the same number of rows as the first matrix and the same number of columns as the second matrix.

Symbolically, let [latex]A[/latex] be an [latex]m\times p[/latex] matrix and let [latex]B[/latex] be an [latex]q\times n[/latex] matrix. Then the product [latex]A\times B=AB[/latex] will be an [latex]m\times n[/latex] matrix provided that [latex]p=q[/latex]. If [latex]p\neq q[/latex], the matrix multiplication is not defined.

The following formula illustrates this requirement and the order of the resulting matrix:

\begin{align*}
\left[ m\times p\right]\left[ p \times n \right] = \left[ m\times n \right].
\end{align*}

For example, a [latex]2\times3[/latex] matrix cannot be multiplied by a [latex]1\times4[/latex] matrix because [latex]3\neq1[/latex] whereas it is possible to multiply a [latex]2\times3[/latex] matrix by a [latex]3\times2[/latex] and the result will be a [latex]2\times2[/latex] matrix.

How to multiply two matrices

Let

\begin{align*}
A & =\left[\begin{array}{ccc}
2 & 4 & 5\\
7 & 8 & 9
\end{array}\right], & B & =\left[\begin{array}{cc}1 & 6\\
3 & 1\\
4 & 2
\end{array}\right].
\end{align*}

We want to find, if it exists, the product [latex]AB[/latex]. First note that we are multiplying a [latex]2\times3[/latex] matrix by a [latex]3\times2[/latex] and so matrix multiplication is possible and the result will be a [latex]2\times2[/latex] matrix. You should always check that the multiplication is possible.

Now, the multiplication procedure is a bit strange at first. The first element of row [latex]1[/latex] of the resulting matrix [latex]AB[/latex] is found by multiplying each element of the first row of [latex]A[/latex] by the corresponding element in the first column of [latex]B[/latex] and then adding products as shown below:

\begin{align*}
AB & =\left[\begin{array}{ccc}
2 & 4 & 5\\
7 & 8 & 9
\end{array}\right]\left[\begin{array}{cc}
1 & 6\\
3 & 1\\
4 & 2
\end{array}\right]\\
& =\left[\begin{array}{cc}
2\times1+4\times3+5\times4 & \text{2nd element of row 1}\\
\text{1st element of row 2} & \text{2nd element of row 2}
\end{array}\right]\\
& =\left[\begin{array}{cc}
2+12+20 & \text{2nd element of row 1}\\
\text{1st element of row 2} & \text{2nd element of row 2}
\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & \text{1st element of row 1}\\
\text{1st element of row 2} & \text{2nd element of row 2}
\end{array}\right].
\end{align*}

The 2nd element of row [latex]1[/latex] is found by multiplying each element of the first row of [latex]A[/latex] by the corresponding element in the second column of [latex]B[/latex] and then adding products as shown below:

\begin{align*}AB & =\left[\begin{array}{ccc}
2 & 4 & 5\\7 & 8 & 9\end{array}\right]\left[\begin{array}{cc}1 & 6\\3 & 1\\4 & 2\end{array}\right]\\
& =\left[\begin{array}{cc}34 & 2\times6+4\times1+5\times2\\\text{1st element of row 2} & \text{2nd element of row 2}\end{array}\right]\\
& =\left[\begin{array}{cc}34 & 12+4+10\\\text{1st element of row 2} & \text{2nd element of row 2}\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & 26\\
\text{1st element of row 2} & \text{2nd element of row 2}
\end{array}\right].
\end{align*}

The 1st element of row [latex]2[/latex] is found by multiplying each element of the second row of [latex]A[/latex] by the corresponding element in the first column of [latex]B[/latex] and then adding products as shown below:

\begin{align*}
AB & =\left[\begin{array}{ccc}
2 & 4 & 5\\
7 & 8 & 9
\end{array}\right]\left[\begin{array}{cc}
1 & 6\\
3 & 1\\
4 & 2
\end{array}\right]\\
&=\left[\begin{array}{cc}
34 & 26\\
7\times1+8\times3+9\times4 & \text{2nd element of row 2}
\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & 26\\
7+24+36 & \text{2nd element of row 2}
\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & 26\\
67 & \text{2nd element of row 2}
\end{array}\right].
\end{align*}

Finally the the 2nd element of row [latex]2[/latex] is found by multiplying each element of the second row of A by the corresponding element in the second column of B and then adding products as shown below:

\begin{align*}
AB & =\left[\begin{array}{ccc}
2 & 4 & 5\\
7 & 8 & 9
\end{array}\right]\left[\begin{array}{cc}
1 & 6\\
3 & 1\\
4 & 2
\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & 26\\
67 & 7\times6+8\times1+9\times2
\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & 26\\
67 & 42+8+18
\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & 26\\
67 & 68
\end{array}\right].
\end{align*}

This may look complicated but in practice, you would not set the question out as above. Instead, you would do each row-column calculation as shown below:

\begin{align*}
AB & =\left[\begin{array}{ccc}
2 & 4 & 5\\
7 & 8 & 9
\end{array}\right]\left[\begin{array}{cc}
1 & 6\\
3 & 1\\
4 & 2
\end{array}\right]\\
& =\left[\begin{array}{cc}
2\times 1+4 \times 3+ 5\times 4 & 2\times 6+4\times 1+5\times 2\\
7\times 1+8 \times 3+9\times 4 & 7\times6+8\times1+9\times2
\end{array}\right]\\
& =\left[\begin{array}{cc}
2+12+20 & 12+4+10\\
7+24+36 & 42+8+18
\end{array}\right]\\
& =\left[\begin{array}{cc}
34 & 26\\
67 & 68
\end{array}\right].
\end{align*}

In general, for two matrices [latex]A[/latex] and [latex]B[/latex], we have [latex]AB\neq BA[/latex]. That is, matrix multiplication is not commutative.

The following examples will illustrate more aspects of matrix multiplication.

 

Examples: Matrix multiplication

1. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 &-1 \\
5 & 3
\end{array}\right] & B & =\left[\begin{array}{ccc}
4 & 7 \\
-2 & 0
\end{array}\right].
\end{align*}

Find [latex]AB[/latex] and [latex]BA[/latex].

Solution:

First, note that both matrices are [latex]2\times 2[/latex]. Hence, the matrix product [latex]AB[/latex] and [latex]BA[/latex] are both defined and will be [latex]2 \times 2[/latex] matrices.

We have,

\begin{align*}
AB&=\left[\begin{array}{ccc}
2 &-1 \\
5 & 3
\end{array}\right] \left[\begin{array}{ccc}
4 & 7 \\
-2 & 0
\end{array}\right]\\
&=\left[\begin{array}{ccc}
2\times 4 +\left(-1\right)\times\left(-2\right) & 2\times 7+\left(-1 \right)\times 0  \\
5\times 4 +3\times\left(-2\right) & 5\times 7+3\times 0  \\
\end{array}\right] \\
&= \left[\begin{array}{ccc}
8+2 & 14+0 \\
20-6 & 35+ 0
\end{array}\right]\\
&= \left[\begin{array}{ccc}
10 & 14 \\
14 & 35
\end{array}\right]\\
\end{align*}

and

\begin{align*}
BA&=\left[\begin{array}{ccc}
4 & 7 \\
-2 & 0
\end{array}\right] \left[\begin{array}{ccc}
2 &-1 \\
5 & 3
\end{array}\right]\\
&=\left[\begin{array}{ccc}
4\times 2 +7\times5 & 4\times \left(-1 \right)+7\times 3  \\
\left(-2\right)\times 2+0\times 5 & \left(-2\right)\times \left(-1\right)+0\times 3\\
\end{array}\right] \\
&= \left[\begin{array}{ccc}
8+35 & -4+21 \\
-4+0 & 2+ 0
\end{array}\right]\\
&= \left[\begin{array}{ccc}
43 & 17 \\
-4 & 2
\end{array}\right].\\
\end{align*}

Note that [latex]AB \neq BA[/latex] as expected.

2. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 &-1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right] & B & =\left[\begin{array}{ccc}
1 & 4 & 7 \\
2 & -2 & 0\\
5 & 1 & -3
\end{array}\right].
\end{align*}

Find [latex]AB[/latex].

Solution:

Since both matrices are [latex]3\times 3[/latex], the product is defined and the result will be a [latex]3 \times 3[/latex] matrix.

\begin{align*}
AB&=\left[\begin{array}{ccc}
2 &-1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right] \left[\begin{array}{ccc}
1 & 4 & 7 \\
2 & -2 & 0\\
5 & 1 & -3
\end{array}\right]\\
&=\left[\begin{array}{ccc}
2\times 1 +\left(-1\right)\times2& 2\times 4+\left(-1 \right)\times \left(-2 \right) &  2\times 7 \\
5\times 1 +3\times 2+1 \times 5 & 5\times 4+3\times \left(-2 \right) +1 \times 1 & 5\times 7 +1\times \left(-3\right)\\
3\times 1 +4 \times 5 & 3\times 4  +4 \times 1 & 3\times 7  +4\times \left(-3\right)\\
\end{array}\right] \\
&= \left[\begin{array}{ccc}
2 -2& 8+2 &  14\\
5+6+5 &20 -6 +1  & 35-3\\
3+20 & 12  +4& 21  -12\\
\end{array}\right]\\
&= \left[\begin{array}{ccc}
0 & 10 &  14\\
16 & 15  & 32\\
23 & 16 & 9\\
\end{array}\right].\\
\end{align*}

3. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 &-1 \\
\end{array}\right] & B & =\left[\begin{array}{ccc}
3  \\
4 \\
\end{array}\right]
\end{align*}

Find [latex]AB[/latex].

Solution:

Since the matrices are [latex]1\times 2[/latex] and [latex]2 \times 1[/latex], the product is defined and will be a [latex]1\times 1[/latex] matrix.

\begin{align*}
AB &=\left[\begin{array}{ccc}
2 &-1
\end{array}\right] \left[\begin{array}{ccc}
3  \\
4
\end{array}\right]\\
&=\left[\begin{array}{ccc}
2\times 3 +\left( -1 \right) \times4
\end{array}\right] \\
&= \left[\begin{array}{ccc}
6-4\\
\end{array}\right]\\
&= \left[\begin{array}{ccc}
2
\end{array}\right].\\
\end{align*}

4. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 \\
-1
\end{array}\right] & B & =\left[\begin{array}{ccc}
3 & 4  \\
\end{array}\right]
\end{align*}

Find [latex]AB[/latex].

Solution:

Since the matrices are [latex]2\times 1[/latex] and [latex]1 \times 2[/latex], the product is defined and will be a [latex]2\times 2[/latex] matrix.

\begin{align*}
AB&=\left[\begin{array}{ccc}
2 \\
-1
\end{array}\right] \left[\begin{array}{ccc}
3 & 4 \\
\end{array}\right]\\
&=\left[\begin{array}{ccc}
2\times 3 & 2\times4\\
\left( -1 \right)\times 3 & \left( -1 \right)\times4
\end{array}\right] \\
&= \left[\begin{array}{ccc}
6 & 8\\
-3 & -4
\end{array}\right].\\
\end{align*}

5. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 &-1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right] & B & =\left\{\begin{array}{ccc}
1  \\
2 \\
5
\end{array}\right\}
\end{align*}

Find [latex]AB[/latex].

Solution:

Since the matrices are [latex]3\times 3[/latex] and [latex]3\times 1[/latex],  the product is defined and the result will be a [latex]3 \times 1[/latex] matrix.

\begin{align*}
AB & = \left[\begin{array}{ccc}
2 & -1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right]
\left\{\begin{array}{ccc}
1  \\
2 \\
5
\end{array}\right\}\\
&=\left\{\begin{array}{ccc}
2\times 1 +\left(-1\right)\times 2 + 0 \\
5\times 1 +3\times 2+1 \times 5 \\
3\times 1 +0 +4\times 5\\
\end{array}\right\}\\
&= \left\{\begin{array}{ccc}
2 -2 \\
5+6+5 \\
3+0 + 20\\
\end{array}\right\}\\
&= \left\{\begin{array}{ccc}
0 \\
16 \\
23\\
\end{array}\right\}.
\end{align*}

6. Let

\begin{align*}
A & =\left[\begin{array}{ccc}
2 &-1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right] & I & =\left[\begin{array}{ccc}
1 &0 & 0\\
0& 1 & 0\\
0 & 0 & 1
\end{array}\right].
\end{align*}

Find [latex]AI[/latex] and [latex]IA[/latex].

Solution:

Since the matrices are [latex]3\times 3[/latex] and [latex]3\times 1[/latex],  the product is defined and the result will be a [latex]3 \times 3[/latex] matrix. Note that the second matrix [latex]I[/latex] is the [latex]3\times 3[/latex] unit matrix.

\begin{align*}
AI &= \left[\begin{array}{ccc}
2 & -1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right]
\left[\begin{array}{ccc}
1 &0 & 0\\
0& 1 & 0\\
0 & 0 & 1
\end{array}\right]\\
&=\left[\begin{array}{ccc}
2\times 1 +0 + 0 &  0 + \left(-1 \right)\times 1 + 0 &  0 + 0 +0   \\
5\times 1 +0 + 0 &  0 +3\times 1 + 0 & 0 + 0 + 1\times 1 \\
3\times 1 +0 + 0 &  0 +0 + 0 &  0 +0 + 4\times 1 \\
\end{array}\right] \\
&=\left[\begin{array}{ccc}
2 & -1 & 0\\
5 & 3 &1\\
3 & 0 & 4
\end{array}\right]\\
&=A.
\end{align*}

\begin{align*}
IA&=\left[\begin{array}{ccc}
1 &0 & 0\\
0& 1 & 0\\
0 & 0 & 1
\end{array}\right]
\left[\begin{array}{ccc}
2 & -1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right]\\
&=\left[\begin{array}{ccc}
1\times 2 +0 + 0 &  1\times \left(-1 \right) + 0 + 0 &  0 + 0 +0   \\
0 + 1\times 5 +0 &  0 +1\times 3 + 0 & 0 + 0 + 1\times 1 \\
0 +0 + 1\times 3 &  0 +0 + 0 &  0 +0 + 1\times 4 \\
\end{array}\right] \\
&=\left[\begin{array}{ccc}
2 & -1 & 0\\
5 & 3 &1\\
3 & 0 & 4
\end{array}\right]\\
&=A.
\end{align*}

In this example, we see that [latex]AI=IA[/latex]. This is true in general for any square matrix [latex]A[/latex].

7. Let

\begin{align*}A & =\left[\begin{array}{ccc}
2 &-1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right] & B & =\left\{\begin{array}{ccc}
x  \\
y \\
z
\end{array}\right\}.
\end{align*}

Find [latex]AB[/latex].

Solution:

Since the matrices are [latex]3\times 3[/latex] and [latex]3\times 1[/latex],  the product is defined and the result will be a [latex]3 \times 1[/latex] matrix.

\begin{align*}
AB & = \left[\begin{array}{ccc}
2 & -1 & 0\\
5 & 3 & 1\\
3 & 0 & 4
\end{array}\right]
\left\{\begin{array}{ccc}
x  \\
y \\
z
\end{array}\right\}\\
&=\left\{\begin{array}{ccc}
2\times x +\left(-1\right)\times y + 0\times z \\
5\times x +3\times y+1 \times z \\
3\times x +0 \times y +4\times z\\
\end{array}\right\}\\
&= \left\{\begin{array}{ccc}
2x -y \\
5x +3y+z \\
3x +4z\\
\end{array}\right\}.\\
\end{align*}

 

The last example above is an example of how matrices may be used to represent a linear equation and is considered in a later section.

Here are some exercises to try.

Exercises: Matrix multiplication

1. Let

\begin{align*}A & =\left[\begin{array}{ccc}
1 & 0 \\
2 & 4
\end{array}\right] \quad \text{and} \quad B  =\left[\begin{array}{ccc}
3 & 5 \\
-2 & 0
\end{array}\right].
\end{align*}

Find [latex]AB[/latex] and [latex]BA[/latex].

Answer

[latex]AB =\left[ \begin{array}{cc} 2 & 5\\ -2 & 10 \end{array}\right] \qquad BA=\left[ \begin{array}{cc} 13 & 20\\ -2 & 0 \end{array}\right][/latex] .

 

2. Let

\begin{align*}C & =\left[\begin{array}{ccc}
2 & 1 \\
3 & -1
\end{array}\right].
\end{align*}

Find [latex]CC^{\text{T}}[/latex] where [latex]C^{\text{T}}[/latex] is the transpose of [latex]C[/latex].

Answer

[latex]CC^{\text{T}}  =\left[\begin{array}{ccc} 5 & 5 \\ 5 & 10 \end{array}\right][/latex].

 

3. Let

\begin{align*}P & =\left[\begin{array}{ccc}
2 & 3 & 1 \\
4 & 5 & 0
\end{array}\right] \quad \text{and} \quad Q  =\left[\begin{array}{ccc}
1 & 0 \\
4 & 1 \\
7 & 0
\end{array}\right].
\end{align*}

Find [latex]PQ[/latex].

Answer

[latex]PQ =\left[ \begin{array}{cc} 21 & 3\\ 24 & 5 \end{array}\right][/latex].

 

4. Let

\begin{align*}M & =\left[\begin{array}{ccc}
2 & 3 & 1 \\
\end{array}\right] \quad \text{and} \quad N  =\left[\begin{array}{ccc}
1  \\
4  \\
7
\end{array}\right].
\end{align*}

Find [latex]MN[/latex].

Answer

[latex]MN=\left[ \begin{array}{cc} 21 \end{array}\right][/latex].

 

5. Let

\begin{align*}M & =\left[\begin{array}{ccc}
1  \\
4  \\
7
\end{array}\right] \quad \text{and} \quad N  =\left[\begin{array}{ccc}
2 & 3 & 1 \\
\end{array}\right].
\end{align*}

Find [latex]MN[/latex].

Answer

[latex]MN=\left[ \begin{array}{ccc} 2 & 3 & 1 \\ 8 & 12 & 4 \\ 14 & 21 & 7 \end{array}\right][/latex].

 

The Determinant

The determinant of a [latex]2\times 2[/latex] matrix

\begin{align*}
A&=\left[\begin{array}{cc}
a & b\\
c & d
\end{array}\right]
\end{align*}

is the number [latex]\det A[/latex] defined as

\begin{align*}
\det A&=ad-bc.
\end{align*}

It is possible to calculate the determinant of any square matrix. But we only consider [latex]2\times 2[/latex] matrices here.

The Inverse matrix

We have seen how to add, subtract and multiply matrices. What about division?

There is no division operation in matrix theory. However, there is the concept of multiplication by the inverse. The inverse of a matrix [latex]A[/latex] is denoted by [latex]A^{-1}[/latex] and has the property that

\begin{align*}
AA^{-1}&=A^{-1}A=I
\end{align*}

where [latex]I[/latex]  is the identity matrix.

For a [latex]2 \times 2[/latex] matrix

\begin{align*}
A&=\left[\begin{array}{cc}
a & b\\
c & d
\end{array}\right],
\end{align*}

the inverse is defined by

\begin{align*}
A^{-1}&=\frac{1}{\det A}
\left[ \begin{array}{cc}
d & -b \\
-c & a \end{array} \right].\\
\end{align*}

Note that in line 1 of the above definition, we divide by [latex]\det A[/latex]. This will be a problem if [latex]\det A =0[/latex] as [latex]\dfrac{1}{0}[/latex] is not defined. If [latex]\det A=0[/latex], the inverse does not exist. Consequently, it is wise to calculate the determinant first when finding the inverse of a matrix. A matrix for which the determinant is zero is called singular. Singular matrices do not have inverses.

For a matrix

\begin{align*}
A&=\left[ \begin{array}{cc}
a & b\\
c& d \end{array} \right],
\end{align*}

we denote the inverse matrix as [latex]A^{-1}[/latex] or

\begin{align*}
A^{-1}&=\left[ \begin{array}{cc}
a & b\\
c& d \end{array} \right]^{-1}.
\end{align*}

As an example of calculating the inverse, consider the matrix

\begin{align*}
A&=\left[ \begin{array}{cc}
1 & 4\\
-2 & 3 \end{array} \right].
\end{align*}

We have

\begin{align*}
\det A&=1\times3 -\left(-2 \right) \times 4\\
&=3+8\\
&=11.
\end{align*}

As the determinant is not equal to zero, the inverse exists and, using the definition,

\begin{align*}
A^{-1}&=\frac{1}{\det A}
\left[ \begin{array}{cc}
d & -b \\
-c & a \end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
3 & -4 \\
2 & 1
\end{array} \right].
\end{align*}

Now we check that [latex]A^{-1}A=AA^{-1}=I[/latex] to ensure that [latex]A^{-1}[/latex] really is the inverse. Note that we have to check both [latex]A^{-1} A[/latex] and [latex]AA^{-1}[/latex] because in general, for two matrices [latex]A[/latex] and [latex]B[/latex], [latex]AB\neq BA[/latex].

We have

\begin{align*}
A^{-1}A&=\frac{1}{11}
\left[ \begin{array}{cc}
3 & -4 \\
2 & 1
\end{array} \right]
\left[ \begin{array}{cc}
1 & 4 \\
-2 & 3
\end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
3\times 1 + \left(-4 \right)\times \left(-2 \right)   &  3\times 4 +\left(-4 \right)\times 3\\
2\times 1 + 1 \times \left(-2 \right)  & 2 \times 4 + 1 \times 3
\end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
3 + 8  &  12 -12\\
2 -2   & 8 + 3
\end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
11  &  0\\
0  & 11
\end{array} \right]\\
&=\left[ \begin{array}{cc}
1  &  0\\
0  & 1
\end{array} \right]\\
&=I
\end{align*}

and

\begin{align*}
AA^{-1}&=\left[ \begin{array}{cc}
1 & 4 \\
-2 & 3
\end{array} \right]
\times \frac{1}{11} \times
\left[ \begin{array}{cc}
3 & -4 \\
2 & 1
\end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
1 & 4 \\
-2 & 3
\end{array} \right]
\left[ \begin{array}{cc}
3 & -4 \\
2 & 1
\end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
1\times 3 + 4\times 2   &   1\times \left(-4 \right) +4 \times 1\\
\left(-2 \right)\times 3  +3\times 2& \left(-2 \right) \times \left(-4 \right) + 3 \times 1
\end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
3 + 8  &  -4+4\\
-6 + 6  & 8 + 3
\end{array} \right]\\
&=\frac{1}{11}
\left[ \begin{array}{cc}
11  &  0\\
0  & 11
\end{array} \right]\\
&=\left[ \begin{array}{cc}
1  &  0\\
0  & 1
\end{array} \right]\\
&=I.
\end{align*}

As [latex]A^{-1}A=AA^{-1}=I[/latex], [latex]A^{-1}[/latex] is the inverse of [latex]A[/latex].

 

Examples: Inverse of a matrix

1. Find the inverse of the matrix

\begin{align*}
A&=\left[ \begin{array}{cc}
4 & 2 \\
6 & 3
\end{array} \right].
\end{align*}

Solution:

Calculating the determinant

\begin{align*}
\det A&=4\times 3\, - \,6 \times 2\\
&=12-12\\
&=0.
\end{align*}

As the determinant is zero, the inverse of A does not exist.

2. Find the inverse of

\begin{align*}
A&=\left[ \begin{array}{cc}
-1 & 2\\
5 & 9
\end{array}\right].
\end{align*}

Solution:

Calculating the determinant,

\begin{align*}
\det A &=\left(-1 \right) \times 9 - 5 \times 2\\
&=-9-10\\
&=-19.
\end{align*}

The inverse is, using the formula above,

\begin{align*}
A^{-1}&=-\frac{1}{19}\left[ \begin{array}{cc}
9 & -2\\
-5 & -1
\end{array}\right]\\
&=\frac{1}{19}\left[ \begin{array}{cc}
-9 & 2\\
5 & 1
\end{array}\right].\\
\end{align*}

Check:

\begin{align*}
A^{-1}A&=\frac{1}{19}\left[ \begin{array}{cc}
-9 & 2\\
5 & 1
\end{array}\right]
\times \left[ \begin{array}{cc}
-1 & 2\\
5 & 9
\end{array}\right]\\
&=\frac{1}{19}\left[ \begin{array}{cc}
-9\times \left(-1\right) + 2 \times 5 & -9 \times 2 + 2 \times 9 \\
5 \times \left(-1 \right) + 1 \times 5 & 5\times 2 + 1 \times 9
\end{array}\right]\\
&=\frac{1}{19}\left[ \begin{array}{cc}
9 + 10 & -18 + 18 \\
-5 + 5 & 10 + 9
\end{array}\right]\\
&=\frac{1}{19}\left[ \begin{array}{cc}
19 & 0 \\
0 + 5 & 19
\end{array}\right]\\
&=\left[ \begin{array}{cc}
1 &0 \\
0 & 1
\end{array}\right]\\
\end{align*}

and

\begin{align*}
AA^{-1}&=\left[ \begin{array}{cc}
-1 & 2\\
5 & 9
\end{array}\right]
\times \frac{1}{19}\left[ \begin{array}{cc}
-9 & 2\\
5 & 1
\end{array}\right]\\
&= \frac{1}{19}\left[ \begin{array}{cc}
-1 & 2\\
5 & 9
\end{array}\right]
\times\left[ \begin{array}{cc}
-9 & 2\\
5 & 1
\end{array}\right]\\
&=\frac{1}{19}\left[ \begin{array}{cc}
-1\times \left(-9\right) + 2 \times 5 & -1 \times2 + 2 \times 1 \\
5 \times \left( -9\right)+ 9 \times 5 & 5 \times 2 + 9 \times 1
\end{array}\right]\\
&=\frac{1}{19}\left[ \begin{array}{cc}
9 + 10 & -2 + 2 \\
-45 + 45 & 10 + 9
\end{array}\right]\\
&=\frac{1}{19}\left[ \begin{array}{cc}
19 & 0 \\
0 & 19
\end{array}\right]\\
&=\left[ \begin{array}{cc}
1 &0 \\
0 & 1
\end{array}\right].\\
\end{align*}

Hence

\begin{align*}
A^{-1}&=\frac{1}{19}\left[ \begin{array}{cc}
-9 & 2\\
5 & 1
\end{array}\right].\\
\end{align*}

Here are some exercises to try.

Exercises: Inverse of a matrix

1. Find the determinant of each of the following matrices :

\begin{align*}A & =\left[\begin{array}{ccc}
2 & 5 \\
5 & 3
\end{array}\right] & B & =\left[\begin{array}{ccc}
1& 0\\
0 & 1\\
\end{array}\right] & C & =\left[\begin{array}{ccc}
1 & 1 \\
-7 & -7\\
\end{array}\right]
& D & =\left[\begin{array}{ccc}
x  & y\\
y & x
\end{array}\right].
\end{align*}

Answers:

\begin{align*} \det A & = -19 & \det B & = 1 & \det C & = 0 & \det D & = x^2
- y^2
\end{align*}

 

2. Find the inverse of the matrix

\begin{align*}P & =\left[\begin{array}{ccc}
2 & 5 \\
5 & 3
\end{array}\right].
\end{align*}

Answer

\begin{align*}P^{-1} & =\frac{1}{19}\left[\begin{array}{ccc}
-3 & 5 \\
5 & -2
\end{array}\right].
\end{align*}

 

3. Find the inverse of the matrix

\begin{align*}Q & =\left[\begin{array}{ccc}
1 & 0 \\
-2 & 3
\end{array}\right].
\end{align*}

Answer

\begin{align*}Q^{-1} & =\frac{1}{3}\left[\begin{array}{ccc}
3 & 0 \\
2 & 1
\end{array}\right].
\end{align*}

Solving systems of equations

A linear system is a set of equations like

\begin{align*}
2x+3y&=8\\
4x-y&=2
\end{align*}

or

\begin{align*}
2x+3y+4z&=8\\
x-5y+z&=2\\
4x-y-7z&=2.
\end{align*}

These are sometimes called simultaneous equations. For a unique solution, there must be as many equations as unknowns. Solutions to these systems may be found using matrix techniques. In this section, we only deal with solutions of systems of two unknowns. In your first year courses, you will learn techniques for larger sets of equations.

Consider the equations

\begin{align*}
2x+3y&=8\\
4x-y&=2.
\end{align*}

These may be put into matrix form as follows:

Write the coefficients of [latex]x[/latex] and [latex]y[/latex] in both equations as a square matrix [latex]A[/latex]. Write the unknowns [latex]x[/latex] and [latex]y[/latex] as a column vector [latex]X[/latex] and set the product of these [latex]AX[/latex] equal to a column vector [latex]B[/latex] comprising the right hand sides of the two equations. That is, we write:

\begin{align*}
\left[ \begin{array}{cc}
2 & 3\\
4 & -1
\end{array}\right]
\left[ \begin{array}{cc}
x\\
y
\end{array}\right]=\left[ \begin{array}{cc}
8\\
2
\end{array}\right]
\end{align*}

or

\begin{align*}
AX&=B.\\
\end{align*}

We call [latex]A[/latex] the coefficient matrix or matrix of coefficients. Now, if we can find an inverse for [latex]A[/latex], [latex]A^{-1}[/latex] we may pre-multiply the matrix equation to get:

\begin{align*}
A^{-1}AX&=A^{-1}B\\
IX&=A^{-1}B\\
X&=A^{-1}B
\end{align*}

which gives the solutions [latex]x[/latex] and [latex]y[/latex] to the set of equations. Note that pre-multiplication means the inverse is applied to the left hand side of each matrix. We will now apply this method.

First, we calculate the determinant of [latex]A[/latex].

\begin{align*}
\det A&=2 \times \left(-1 \right)\, - \, 4  \times 3\\
&=-2-12\\
&=-14.
\end{align*}

Hence, the inverse is

\begin{align*}
A^{-1}&=\frac{1}{\det A}
\left[ \begin{array}{cc}
-1 & -3\\
-4 & 2
\end{array} \right]\\
&=-\frac{1}{14}
\left[ \begin{array}{cc}
-1 & -3\\
-4 & 2
\end{array} \right]\\
&=\frac{1}{14}
\left[ \begin{array}{cc}
1 & 3\\
4 & -2
\end{array} \right].\\
\end{align*}

Now we pre-multiply the matrix equation to get:

\begin{align*}
\frac{1}{14}\left[ \begin{array}{cc}
1 & 3\\
4 & -2
\end{array}\right]
\left[ \begin{array}{cc}
2 & 3\\
4 & -1
\end{array}\right]
\left[ \begin{array}{cc}
x\\
y
\end{array}\right]
&=\frac{1}{14}\left[ \begin{array}{cc}
1 & 3\\
4 & -2
\end{array}\right]\left[ \begin{array}{cc}
8\\
2
\end{array}\right]\\
\implies \frac{1}{14}\left[ \begin{array}{cc}
2+12 & 3\,-\,3\\
8\,-\,8 & 12 + 2
\end{array}\right]
\left[ \begin{array}{cc}
x\\
y
\end{array}\right] &=
\frac{1}{14}\left[ \begin{array}{cc}
1\times 8 + 3\times 2\\
4\times 8 - 2\times 2
\end{array}\right]\\
\implies \frac{1}{14}\left[ \begin{array}{cc}
14 & 0\\
0 & 14
\end{array}\right]
\left[ \begin{array}{cc}
x\\
y
\end{array}\right]
&=\frac{1}{14}\left[ \begin{array}{cc}
8+ 6\\
32 - 4
\end{array}\right]\\
\implies \left[ \begin{array}{cc}
1 & 0\\
0 & 1
\end{array}\right]
\left[ \begin{array}{cc}
x\\
y
\end{array}\right]
&=\frac{1}{14}\left[ \begin{array}{cc}
14\\
28
\end{array}\right]\\
\implies \left[ \begin{array}{cc}
x\\
y
\end{array}\right]
&=\left[ \begin{array}{cc}
1\\
2
\end{array}\right].\\
\end{align*}

Hence [latex]x=1[/latex] and [latex]y=2[/latex].

Note that the matrix multiplications on the left hand side are to show all the details and are not required. In practice, we would write

\begin{align*}
\left[ \begin{array}{cc}
x\\
y
\end{array}\right]
&=\frac{1}{14}\left[ \begin{array}{cc}
1 & 3\\
4 & -2
\end{array}\right]\left[ \begin{array}{cc}
8\\
2
\end{array}\right]\\
&=\frac{1}{14}\left[ \begin{array}{cc}
1\times 8 + 3\times 2\\
4\times 8 - 2\times 2
\end{array}\right]\\
&=\frac{1}{14}\left[ \begin{array}{cc}
8 + 6\\
32 - 4
\end{array}\right]\\
&=\frac{1}{14}\left[ \begin{array}{cc}
14\\
28
\end{array}\right]\\
&=\left[ \begin{array}{cc}
1 \\
2
\end{array}\right].
\end{align*}

It is good practice to check your answer by substituting the calculated value for [latex]x[/latex] and [latex]y[/latex] into the original equations which were:

\begin{align*}
2x+3y&=8\\
4x-y&=2.
\end{align*}

We have, for the first equation,

\begin{align*}
2x+3y&=2 \times 1 + 3 \times 2\\
&=2+6\\
&=8
\end{align*}

as required and, for the second equation,

\begin{align*}
4x-y&=4 \times 1 \,-\,2\\
&=4-2\\
&=2.
\end{align*}

Hence, the solution is [latex]x=1[/latex] and [latex]y=2[/latex].

Here are some examples of solving equations using matrices.

Examples: Matrices and systems of equations

1. Write the following equations in matrix form. Do not solve the equations.

\begin{align*}
2x+3y&=-11\\
7x-5y&=52.\\
\end{align*}

Solution:

\begin{align*}
\left[\begin{array}{cc}
2 & 3 \\
7 & -5 \end{array}\right]
\left[\begin{array}{c}
x \\
y \end{array}\right]
&=
\left[\begin{array}{c}
-11 \\
52 \end{array} \right]. \\
\end{align*}

 

2. Write the following equations in matrix form. Do not solve the equations.

\begin{align*}
2x+3y+4z&=8\\
x-5y&=2\\
4x-y-7z&=9.
\end{align*}

Solution:

\begin{align*}
\left[\begin{array}{cc}
2 & 3 & 4\\
1 & -5 & 0 \\
4 & -1 & -7 \end{array}\right]
\left[\begin{array}{c}
x \\
y \\
z \\ \end{array}\right]
&=
\left[\begin{array}{c}
8 \\
2 \\
9
\end{array} \right]. \\
\end{align*}

 

3. Solve the following equations using matrix methods.

\begin{align*}
7x&=21\\
-5x+3y&=-9.\\
\end{align*}

Solution:

The equations in matrix form are:

\begin{align*}
\left[\begin{array}{cc}
7 & 0 \\
-5 & 3 \end{array}\right]
\left[\begin{array}{c}
x \\
y \end{array}\right]
&=
\left[\begin{array}{c}
21 \\
-9 \end{array} \right]. \\
\end{align*}

The determinant of the coefficient matrix

\begin{align*}
\det \left[\begin{array}{cc}
7 & 0 \\
-5 & 3 \end{array}\right] &= 7\times 3 +0\times \left(-5 \right)\\
&= 21.
\end{align*}

As the determinant is not zero, an inverse exists.

The inverse of the coefficient matrix is

\begin{align*}
\left[\begin{array}{cc}
7 & 0 \\
-5 & 3 \end{array}\right]^{-1}
&=\frac{1}{21}
\left[\begin{array}{cc}
3 & 0\\
5 & 7 \end{array}\right]\\
\end{align*}

Pre-multiplying the matrix equation by the inverse we have

\begin{align*}
\frac{1}{21}\left[\begin{array}{cc}
3 & 0\\
5 & 7\\ \end{array}\right]\left[\begin{array}{cc}
7 & 0 \\
-5 & 3 \end{array}\right]\left[\begin{array}{c}
x \\
y \end{array}\right]
&=\frac{1}{21}\left[\begin{array}{cc}
3 & 0\\
5 & 7\\ \end{array}\right]
\left[ \begin{array}{ccc}
21 \\
-9 \end{array} \right] \\
\implies \left[\begin{array}{c}
x \\
y \end{array}\right]&=\frac{1}{21}\left[\begin{array}{cc}
3 \times 21 + 0 \times \left(-9 \right) \\
5 \times 21 + 7 \times \left(-9 \right)\\ \end{array}\right]\\
&=\frac{1}{21}\left[\begin{array}{cc}
63 + 0 \\
105 -63 \end{array}\right]\\
&=\frac{1}{60}\left[\begin{array}{cc}
63 \\
42 \end{array}\right]\\
&=\left[\begin{array}{cc}
3 \\
2 \end{array}\right].\\
\end{align*}

Hence [latex]x=3[/latex] and [latex]y=2[/latex]. You should check this by substituting in the original equations. For equation [latex]1[/latex], we have

\begin{align*}
7x&=7\times 3\\
&=21
\end{align*}

as required.

For equation we have

\begin{align*}
-5x+3y&=-5\times 3+ 3 \times 2\\
&= -15+6 \\
&=-9
\end{align*}

as required. Hence [latex]x=3[/latex] and [latex]y=2[/latex] is the solution.

 

4. Solve the following equations using matrix methods.

\begin{align*}
7x+3y&=8\\
14x+6y&=-2.\\
\end{align*}

Solution:

The equations in matrix form are:

\begin{align*}
\left[\begin{array}{cc}
7 & 3 \\
14 & 6 \end{array}\right]
\left[\begin{array}{c}
x \\
y \end{array}\right]
&=
\left[\begin{array}{c}
8 \\
-2 \end{array} \right]. \\
\end{align*}

The determinant of the coefficient matrix

\begin{align*}
\det \left[\begin{array}{cc}
7 & 3 \\
14 & 6 \end{array}\right]
&=7\times 6 - 3\times 14\\
&=42-42\\
&=0.
\end{align*}

As the determinant is zero, no inverse exists and the system of equations does not have a solution.

5. Solve the following equations using matrix methods.

\begin{align*}
4x+3y&=6\\
8x-9y&=-2.\\
\end{align*}

Solution:

The equations in matrix form are:

\begin{align*}
\left[\begin{array}{cc}
4 & 3 \\
8 & -9 \end{array}\right]
\left[\begin{array}{c}
x \\
y \end{array}\right]
&=
\left[\begin{array}{c}
6 \\
-2 \end{array} \right]. \\
\end{align*}

The determinant of the coefficient matrix

\begin{align*}
\det \left[\begin{array}{cc}
4 & 3 \\
8 & -9 \end{array}\right]
&=4\times \left(-9\right) - 8\times 3\\
&=-36-24\\
&=-60.
\end{align*}

As the determinant is not zero, an inverse exists.

The inverse of the coefficient matrix is

\begin{align*}
\left[\begin{array}{cc}
4 & 3 \\
8 & -9 \end{array}\right]^{-1}
&=-\frac{1}{60}
\left[\begin{array}{cc}
-9 & -3\\
-8 & 4 \end{array}\right]\\
&=\frac{1}{60}\left[\begin{array}{cc}
9 & 3\\
8 & -4\\ \end{array}\right].\\
\end{align*}

Pre-multiplying the matrix equation by the inverse we have

\begin{align*}
\frac{1}{60}\left[\begin{array}{cc}
9 & 3\\
8 & -4\\ \end{array}\right]\left[\begin{array}{cc}
4 & 3 \\
8 & -9 \end{array}\right]\left[\begin{array}{c}
x \\
y \end{array}\right]
&=\frac{1}{60}\left[\begin{array}{cc}
9 & 3\\
8 & -4\\ \end{array}\right]
\left[ \begin{array}{ccc}
6 \\
-2 \end{array} \right] \\
\implies \left[\begin{array}{c}
x \\
y \end{array}\right]&=\frac{1}{60}\left[\begin{array}{cc}
9 \times 6 + 3 \times \left(-2 \right) \\
8 \times 6 + \left(-4 \right) \times \left(-2 \right)\\ \end{array}\right]\\
&=\frac{1}{60}\left[\begin{array}{cc}
54 - 6 \\
48 +8 \end{array}\right]\\
&=\frac{1}{60}\left[\begin{array}{cc}
48 \\
56 \end{array}\right]\\
&=\frac{1}{60}\left[\begin{array}{cc}
4/5 \\
14/15 \end{array}\right].\\
\end{align*}

Hence [latex]x=\dfrac{4}{5}[/latex] and [latex]y=\dfrac{14}{15}[/latex]. You should check this by substituting in the original equations. For equation [latex]1[/latex], we have

\begin{align*}
4x+3y&=4\times \frac{4}{5}+3 \times \frac{14}{15}\\
&= \frac{16}{5} +\frac{42}{15}\\
&=\frac{48+42}{15}\\
&=\frac{90}{15}\\
&=6
\end{align*}

as required.

For equation we have

\begin{align*}
8x-9y&=8\times \frac{4}{5}-9 \times \frac{14}{15}\\
&= \frac{32}{5} -\frac{126}{15}\\
&=\frac{96-126}{15}\\
&=-\frac{30}{15}\\
&=-2
\end{align*}

as required. Hence [latex]x=\dfrac{4}{5}[/latex] and [latex]y=\dfrac{14}{15}[/latex] is the solution.

Here are some exercises to try.

Exercises: Solving systems of equations

1. Write down the matrix form of the following system. Don't solve the system.

\begin{align*}
2x+3y&=8\\
4x-y&=2.
\end{align*}

Answer

1. [latex]\left[\begin{array}{ccc} 2 & 3\\ 4 & -1 \end{array}\right] \left[\begin{array}{ccc} x\\ y \end{array}\right]= \left[\begin{array}{ccc} 8\\ 2 \end{array}\right].[/latex]

 

2. Write down the matrix form of the following system. Don't solve the system.

\begin{align*}
2x+3y -z &=8\\
-y +4z &=2\\
x  -y +z& =9.
\end{align*}

Answer

2. [latex]\left[\begin{array}{ccc} 2 & 3 & -1\\ 0 & -1 & 4\\ 1 & -1 & 1 \end{array}\right] \left[\begin{array}{ccc} x\\ y\\ z \end{array}\right]= \left[\begin{array}{ccc} 8\\ 2\\ 9 \end{array}\right].[/latex]

 

3. Write down the matrix form of the following system and solve for [latex]x[/latex] and [latex]y[/latex] using matrix methods.

\begin{align*}
3x + y&= -1\\
2x-5y&=-12.
\end{align*}

Answer

3. [latex]\ x=-1,\quad y=2.[/latex]

 

4. Write down the matrix form of the following system and solve for [latex]x[/latex] and [latex]y[/latex] using matrix methods.

\begin{align*}
4x + 3y&= 3\\
10x-9y&= 2.
\end{align*}

Answer

4. [latex]\ x=\dfrac{1}{2}, \quad y=\dfrac{1}{3}.[/latex]

Key takeaways

1. A matrix is an array of numbers or pronumerals.

2. The order of a matrix is the number of rows by the number of columns. Hence a matrix with three rows and four columns has order three by four and is denoted by [latex]3\times 4[/latex].

3. The determinant of a [latex]2 \times 2[/latex] matrix

\begin{align*}
A&=\left[\begin{array}{cc}
a & b\\
c & d
\end{array}\right],
\end{align*}

is denoted by [latex]\det A[/latex] and

\begin{align*}
\det A&=  ad-bc.
\end{align*}

4. The inverse of a [latex]2 \times 2[/latex] matrix

\begin{align*}
A&=\left[\begin{array}{cc}
a & b\\
c & d
\end{array}\right],
\end{align*}

is denoted by [latex]A^{-1}[/latex] and

\begin{align*}
A^{-1}&=\frac{1}{\det A}\left[\begin{array}{cc}
d & -b\\
-c & a
\end{array}\right]\\
&=\frac{1}{ad-bc}\left[\begin{array}{cc}
d & -b\\
-c & a
\end{array}\right].\\
\end{align*}