0% found this document useful (0 votes)
16 views64 pages

(1JV734 Combined Matrices Lecture

This document outlines a lecture on matrices, covering their terminology, arithmetic, row operations, and systems of linear equations. It explains the structure of matrices, types of matrices, and operations such as addition, subtraction, and multiplication. Additionally, it introduces Gaussian elimination and elementary row operations (EROs) used to manipulate matrices.

Uploaded by

Ade Irma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views64 pages

(1JV734 Combined Matrices Lecture

This document outlines a lecture on matrices, covering their terminology, arithmetic, row operations, and systems of linear equations. It explains the structure of matrices, types of matrices, and operations such as addition, subtraction, and multiplication. Additionally, it introduces Gaussian elimination and elementary row operations (EROs) used to manipulate matrices.

Uploaded by

Ade Irma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

JV734

Matrices I
Outline of Lecture

• Matrices • Identity matrix


– Terminology • Algebra of matrices
– Arithmetic • Inverses of matrices
• Row operations – 2x2
– EROs – Nonsingularity
– Inverses – Relation to linear equations
• Gaussian elimination – Using elementary matrices
– Systems of linear equations
– Echelon matrices
– General solutions
• Matrix multiplication
– Definitions
– Properties

2
Matrices

A matrix (plural: matrices) is a rectangular array of numbers.

Each individual element of a matrices is called an entry.


2 45 −1 5
Each horizontal line of entries is called a row (numbered top to
0.7 5 −26 0
bottom). 𝐴=# /
14 1 1 0
Each vertical line of entries is called a column (numbered left to 𝑒 23 32 −31
right).

We identify each entry of matrix A with the notation aij, where i is


the row of the entry and j is the column.
Example

For the matrix A give the third row, second column and entries
a33, a21 & a12.

Since we count from top-to-bottom for rows, the third row is the
2 45 −1 5
one highlighted, and can be described by: 0.7 5 −26 0
𝐴=# /
[14 1 1 14 1 1 0
0]
𝑒 23 32 −31
The second column is the second-from-left, and so is the one
highlighted, and can be described by:
45
5
! '
1
23
Example

Recall that an entry is defined by aij, where i is the row of the


entry and j is the column.

Therefore, the entries a33, a21 & a12 are: 2 45 −1 5


0.7 5 −26 0
𝐴=# /
𝑎33 = 1 14 1 1 0
𝑒 23 32 −31
𝑎21 = 0.7
𝑎12 = 45
Matrices

A matrix with m rows and n columns is called a m x n matrix. For


example, the matrix A is a 3 x 4 matrix. m and n define a matrix’s
dimension.

Some specific values of m and n lead to particular types of 𝑎11 𝑎12 𝑎13 𝑎14
matrices: 𝐴 = #𝑎21 𝑎22 𝑎23 𝑎24 )
𝑎31 𝑎32 𝑎33 𝑎34
A row matrix is a matrix with exactly one row (m = 1).

A column matrix is a matrix with exactly one column (n = 1).

A square matrix is a matrix with the same number of rows and


columns (m = n).
Matrix Arithmetic

Addition and subtraction is only defined between matrices of the


2 0 8
same size – i.e. with the same number of rows, and the same 𝐴=# *
number of columns. −1 4 −2
6 1 −2
For example, A ± B are defined, but A ± C and B ± C are not. 𝐵=# *
4 0 0
Both operations are simply carried out by applying the operation 6 −2
to corresponding elements. 𝐶 = #4 0 *
4 3
For example:

2+6 0+1 8−2 8 1 6


𝐴+𝐵 =% -=% -
−1 + 4 4 + 0 −2 + 0 3 4 −2
2−6 0−1 8+2 −4 −1 10
𝐴−𝐵 =% -=% -
−1 − 4 4 − 0 −2 − 0 −5 4 −2
Matrix Arithmetic

We will cover multiplication between matrices later, but a


2 0 8
multiplication of a matrix by a scalar simply results in that scalar 𝐴=# *
being multiplied by every entry in the matrix. −1 4 −2
6 1 −2
For example: 𝐵=# *
3(6) 3(−2) 18 −6 4 0 0
3𝐶 = $3(4) 3(0) , = -12 0 1 6 −2
3(4) 3(3) 12 9 𝐶 = #4 0 *
4 3
Clearly, multiplying by the scalar 0 gives a matrix where every
entry is 0. This is known as a zero matrix and is denoted Om,n. For
example, the matrix 02,3 is given by:

0 0 0
𝑂2,3 = & (
0 0 0
Matrix Arithmetic

Two matrices P & Q are only equal if all, for all i & j: pij = qij.
2 0 8
𝐴=# *
In other words, two matrices are only equal if all corresponding −1 4 −2
entries are real. Matrices of different dimensions can never be 6 1 −2
equal. 𝐵=# *
4 0 0
Therefore, none of the four matrices shown are equal. However, 6 −2
we can say that (-2)A = D. 𝐶 = #4 0 *
4 3
−4 0 −16
𝐷=# +
2 −8 4
Example

Calculate 3A – B.
1 −4
1 −4 −4 10 𝐴=# )
3𝐴 − 𝐵 = 3 & *−& * 3 5
3 5 0 3
−4 10
𝐵=# )
3 −12 −4 10 0 3
=" (−" (
12 15 0 3
5 𝑥
𝐶=# (
7 −22 3 2
=" '
12 12
Example

Find the value of x such that B + C = A.


1 −4
−4 10 5 𝑥 1 −4 𝐴=# )
! '+! '=! ' 3 5
0 3 3 2 3 5
−4 10
𝐵=# )
Since addition solely occurs between corresponding entries, we
0 3
can isolate the 1,2 entries from each matrix:
5 𝑥
𝐶=# (
10 + 𝑥 = −4 3 2

𝑥 = −14
Row Operations

Row operations are operations that can be applied to a matrix


that can affect the matrix’s rows individually.

We will focus on three particularly important row operations,


known as elementary row operations, or EROs. 𝑎11 𝑎12 𝑎13 𝑎14
𝐴 = #𝑎21 𝑎22 𝑎23 𝑎24 )
The first of these (Type 1) is interchanging two rows (say, p and 𝑎31 𝑎32 𝑎33 𝑎34
q). The notation for this is Rp ↔ Rq.

For example, carrying out R1 ↔ R2 on the matrix A gives:

𝑎21 𝑎22 𝑎23 𝑎24


𝐴 = #𝑎11 𝑎12 𝑎13 𝑎14 )
𝑎31 𝑎32 𝑎33 𝑎34
Row Operations

The Type 2 ERO is multiplying a row by a non-zero scalar. The


notation for this is Rp → λRp, where λ is a real-valued scalar.

For example, applying the operation R1 → 2R1 on A gives:


𝑎11 𝑎12 𝑎13 𝑎14
2𝑎11 2𝑎12 2𝑎13 2𝑎14
𝐴 = #𝑎21 𝑎22 𝑎23 𝑎24 )
𝐴 = # 𝑎21 𝑎22 𝑎23 𝑎24 ) 𝑎31 𝑎32 𝑎33 𝑎34
𝑎31 𝑎32 𝑎33 𝑎34
The final ERO (Type 3) is adding a scalar multiplication of one row
to a pre-existing row. The notation for this is Rp → Rp + λRq.

For example, applying the operation R1 → R1 + 3R2 on A gives:


𝑎11 + 3𝑎21 𝑎12 + 3𝑎22 𝑎13 + 3𝑎23 𝑎14 + 3𝑎24
𝐴=# 𝑎21 𝑎22 𝑎23 𝑎24 *
𝑎31 𝑎32 𝑎33 𝑎34
Example

Apply the following EROs to the matrix A:


R2 → (-1)R2, R2 → R2 + 0.5R1, R1 ↔ R2 .
2 0 4
𝐴=# *
−1 5 −2
2 0 4
𝑅2 → (−1)𝑅2 ( ,
1 −5 2

2 0 4
𝑅2 → 𝑅2 + 0.5𝑅1 ) ,
2 −5 4
2 −5 4
𝑅1 ↔ 𝑅2 % *
2 0 4
Row Operations

One use of Type 3 ERO is to ‘clear’ a column. That is, to turn all
values except one in the column to 0.
∗ 𝑎12 ∗ ∗
Say in matrix A we want to turn all entries in the second column 𝐴 = #∗ 𝑎22 ∗ ∗)
except a12 to 0, we can use the following operation: ∗ 𝑎32 ∗ ∗
∗ 𝑎12 ∗ ∗
𝑎22 𝑎22 ∗ 𝑎12 ∗ ∗
𝑅2 → 𝑅2 − 𝑅 𝐴 = #∗ 𝑎22 − 𝑎 ∗ ∗ * = +∗ 0 ∗ ∗-
𝑎12 1 𝑎12 12 ∗ 𝑎32 ∗ ∗
∗ 𝑎32 ∗ ∗

This would be repeated with row 3 to clear column 2.


Example

For the matrix A, clear the third column except for the top row.
3 2 −4
𝐴 = #−2 −3 2 *
1 0 −2
3 2 −4 3 2 −4
2 2×3 2×2 2 × (−4) −1
𝑅2 → 𝑅2 − 𝐴
𝑅1 = #−2 − −3 − 2− - = # −2 0 -
−4 −4 −4 −4 2
1 0 −2 1 0 −2
3 2 −4 3 2 −4
⎡ −1 ⎤ ⎡−1 ⎤
−2 ⎢ −2 0 ⎥ ⎢ −2 0 ⎥
𝑅3 → 𝑅3 − 𝑅1 ⎢ 2 =
⎥ ⎢ 2 ⎥
−4 2 × 3 2 × 2 2 × (−4) −1
⎢ ⎥ ⎢ ⎥
⎣1 − 0 − −2 − ⎦ ⎣2 −1 0 ⎦
4 4 4
Systems of Linear Equations

A linear equation is any equation where all variables are to the


power of 1. For example:

𝑦 = 3𝑥 − 19
𝑎+𝑏 =7−𝑐
𝑎𝑥1 + 𝑏𝑥2 + 𝑐𝑥3 = 𝑑 (𝑎, 𝑏, 𝑐, 𝑑 ∈ ℝ)
are all valid linear equations. Any linear equation can be
expressed in the general format:

𝑎1 𝑥1 + 𝑎2 𝑥2 + 𝑎3 𝑥3 + ⋯ + 𝑎𝑛 𝑥𝑛 = 𝑏 (𝑎𝑖 , 𝑏𝑖 ∈ ℝ)
Systems of Linear Equations

A system of linear equations is simply a number of linear


equations that share the same variables. For example:

𝑥 + 2𝑦 − 2𝑧 = 10
2𝑥 + 𝑧 = 4
is a system of linear equations. We can generalise any system of
linear equations in the following way:
𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2
𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + 𝑎𝑚3 𝑥3 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 = 𝑏𝑚 (𝑎𝑖𝑗 , 𝑏𝑖 ∈ ℝ)
Systems of Linear Equations

We can express a system of linear equations by taking the


coefficients (aij) of the variables, and the right-hand side of each
equation:
𝑎11 𝑎12 … 𝑎1𝑛 𝑏1
𝑎21 𝑎22 … 𝑎2𝑛 𝑏
𝐴=# ⋮ ⋮ ⋱ ⋮ , 𝐻 = # 2)

𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛 𝑏𝑚
A matrix can be augmented with a second matrix by inserting the
second matrix to the right of the first, as long as both matrices
have the same number of rows. This means we can obtain the
following augmented matrix:
𝑎11 𝑎12 … 𝑎1𝑛 𝑏1
𝑎 𝑎22 … 𝑎2𝑛 𝑏2
[𝐴 𝐻] = ' 21 1
⋮ ⋮ ⋱ ⋮ ⋮
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛 𝑏𝑚
Echelon Matrices

An echelon matrix is a matrix that satisfies two conditions:

i) any all-zero rows are at the bottom of the matrix 7 8 −1 3 1


0 4 −3 0 9
ii) in the non-zero rows, the leading entries are positioned 𝐴=# .
further and further to the right as you move down the 0 0 6 −3 2
matrix. 0 0 0 2 4
For example, the matrix A shown is an echelon matrix.
Exercise

Use the EROs previously detailed to transform the matrix A into


an echelon matrix.
2 −3 1 7
𝐴 = #6 2 −2 3-
4 9 0 4
Firstly, we can use the Type 3 ERO to clear the first column except
the top row.

2 −3 1 7
𝑅2 → 𝑅2 − 3𝑅1 !0 11 −5 −18*
𝑅3 → 𝑅3 − 2𝑅1 0 15 −2 −10

2 −3 1 7
15
𝑅3 → 𝑅3 − 𝑅2 = 0 11 −5 −18
11 0 0 53/11 160/11
Echelon Matrices

If we suppose that the matrix we found from the previous


2 −3 1 7
example represented a system of linear equations, we can now
write out the equations as: 0 11 −5 −18
0 0 53/11 160/11
2𝑥1 − 3𝑥2 + 𝑥3 = 7
11𝑥2 − 5𝑥3 = −18
!"
𝑥3 = 160/11
##

From here, it is straightforward to find values for the variables.


Specifically, we find that:

X1 = 169/106 x2 = -14/53 x3 = 160/53


Gaussian Elimination

We find that it is easier to find these final solutions if we divide


each row by its leading entry. So the matrix given before would
be transformed into:

1 −3/2 1/2 7/2


0 1 −5/11 −18/11
0 0 1 160/53

This is known as Gaussian elimination.


Gaussian Elimination

Sometimes we will find that Gaussian elimination does not lead


us to a numerical solution, instead we may only be able to give a
general solution.
1 8 2 −3 −4
For example, say our final echelon matrix is: !0 1 3 3 −5*
0 0 1 −3 22
To find a general solution, we can start by giving one of the
variables an algebraic solution.
Gaussian Elimination

Not all matrices will yield solutions. This is easy to contemplate. 𝑥1 + 𝑥2 = 3


For example, consider the equations shown on the right, which
are clearly contradictory. 𝑥1 + 𝑥2 = 5

In general, any matrix with a final row of the format


[0 0 ... 0 λ] (λ ≠ 0)

Is equivalent to the equation 0 = λ, and so must be an impossible


solution. This is known as an inconsistent solution.
Matrix Multiplication

Matrix multiplication between two vectors A and B gives a third


matrix C, where each entry of C is the scalar product of the
corresponding row of A and column of B.
𝑎11 𝑎12 𝑎13
𝑐11 𝑐12 𝐴 = #𝑎 𝑎22 𝑎23 (
𝐶 = #𝑐 𝑐22 '
21
21

In order for the scalar product to be defined, both vectors need 𝑏11 𝑏12
to have the same number of elements. Therefore, matrix
multiplication is only defined between two matrices AB when the 𝐵 = #𝑏21 𝑏22 (
number of columns in A is the same as the number of rows in B. 𝑏31 𝑏32
The dimensions of C will be given by the number of rows in A by
the number of columns in B.

In the multiplication AB, we say that B is pre-multiplied by A, and


that A is post-multiplied by B.
Matrix Multiplication

Returning to our use of matrices to represent a system of linear


equations, we can now show how matrix multiplication is used to
fully demonstrate how this representation works.

To do this, we introduce a new column matrix X, containing all


the variables used within the equations.

𝑎11 𝑎12 … 𝑎1𝑛 𝑥1 𝑏1


𝑎21 𝑎22 … 𝑎2𝑛 𝑥2 𝑏
𝐴=# ⋮ 𝑋=# ⋮ ) 𝐻 = # 2)
⋮ ⋱ ⋮ , ⋮
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛 𝑥𝑛 𝑏𝑚
Writing out the multiplication AX shows that AX = H is a
representation of our linear equations.
Properties of Matrix Multiplication

We are now going to look at some basic properties of matrix


multiplication. 5 5 0
𝐴 = # −5 9 7 -
First of all, it is pretty clear that AB is not equal to BA (matrix
multiplication is not commutative). In fact, even if AB is defined,
−21 6 −8
this does not necessarily mean BA is defined. For example, 6 7
consider the matrices A and B shown.
𝐵 = #0 5 *
AB (3 x 3 vs. 3 x 2) is defined, however BA (3 x 2 vs. 3 x 3) is not. 0 −2
0 1 19
Whilst both BC and CB will be defined, BC will give a 3 x 3 matrix, 𝐶=# +
whilst CB will give a 2 x 2 matrix.
−5 8 −3
Properties of Matrix Multiplication

Matrix multiplication is associative. This means that for three


matrices A, B and C, where AB and BC are defined, then: 5 5 0
𝐴 = # −5 9 7 -
A(BC) = (AB)C
−21 6 −8
6 7
𝐵 = #0 5 *
0 −2
0 1 19
𝐶=# +
−5 8 −3
Properties of Matrix Multiplication

Matrix multiplication is distributive. This means that for any


three matrices where AB, AC and B + C exist: 5 5 0
𝐴 = # −5 9 7 -
A(B + C) = AB + AC.
−21 6 −8
Exercise: calculate A(B + C) and AB + AC for the three matrices
6 7
shown.
𝐵 = #0 5 *
Similarly, we find that (λA)B = A(λB) = λAB, where λ is a scalar.
0 −2
1 6
𝐶 = #−4 3+
0 8
Properties of Matrix Multiplication

It is straightforward to see that a matrix can only be multiplied by


itself if it is a square matrix. 5 5 0
𝐴 = # −5 9 7 -
For the matrices shown, this means that only A can multiplied by
itself. −21 6 −8
6 7
We write down a matrix that has been multiplied by itself as A2 –
that is, exactly as we would with a number that has been 𝐵 = #0 5 *
multiplied by itself. 0 −2
From the previously-defined associativite law, we can see that 1 6
the following laws of indices still hold: 𝐶 = #−4 3+
0 8
ApAq = Ap+q (Ap)q = Apq
The Identity Matrix

The main diagonal of a matrix is the diagonal running from the


top-left corner to the bottom-right corner. That is, any entry aij
where i = j.
𝟏 −2 0
𝐴 = #0 𝟒 −8-
For example, in the matrix A the main diagonal is the one 7 5 𝟎
highlighted in bold.

The identity matrix is an important square matrix where all


entries are 0, except for those on the main diagonal, which are 1.
1 0 0
This matrix is written In, where n gives the number of rows and 𝐼3 = $0 1 0'
columns. For example, I3 is shown on the right. 0 0 1
The Identity Matrix

In matrix multiplication, I effectively acts as 1, as InA = AIn = A


1 0 ⋯ 0
Similarly, In2 = Ink = In. 0 1 ⋯ 0
𝐼𝑛 = $ *
⋮ ⋮ ⋱ ⋮
The identity matrix can be useful when expressing equations
0 0 ⋯ 1
involving matrices.

For example, A3 + 2A can be expressed as A(A2 + 2I)


Commuting

Two matrices commute if AB =BA.

In will commute with any square matrix of dimension n x n.

Any two powers of a square matrix A will commute, since


Ap Aq = Ap + q = Aq Ap
Example

Give the general form of all matrices that commute with the 2 1
𝐴=# '
matrix A. 1 0
We only need to consider matrices of the dimensions 2 x 2. We 𝑎 𝑏
will use the general form shown by the matrix B.
𝐵=# (
𝑐 𝑑
𝐴𝐵 = 𝐵𝐴
2𝑎 + 𝑐 2𝑏 + 𝑑 2𝑎 + 𝑏 𝑎
! (=! (
𝑎 𝑏 2𝑐 + 𝑑2𝑎 2𝑎
+𝑐 𝑐+=𝑐 2𝑎 +𝑏
= 2𝑎 + 𝑏
2𝑎 + 𝑐 = 2𝑎 +𝑏
We can now equate individual entries:
2𝑎2𝑏 𝑐+=𝑑+2𝑎
+ 2𝑏 = 𝑎+ 𝑏
𝑑=𝑎
From this we can say that c = b and a = 2b
+ d, and give the general form as:
2𝑏 𝑎+=𝑑 2𝑐
= 𝑎+ 𝑑
2𝑏 𝑎+= 𝑑 2𝑐
= 𝑎+ 𝑑
2𝑏 + 𝑑 𝑏
𝑎 = 2𝑐 +
= 𝑑𝑐+ 𝑑 𝐵=# (
𝑎 =𝑏 2𝑐
𝑏=𝑐
𝑏 𝑑
𝑏=𝑐
𝑏=𝑐
Algebra of Matrices

We can use algebra as shorthand for writing down equations


involving matrices.

This is very similar to standard algebra, with the primary


difference being that the order of multiplication is important
(since AB does not always equal BA).

We will now look at a few outcomes of this key difference.


Algebra of Matrices

The index law that states ApBp = (AB)p does not hold for non-
commuting matrices. We can see this for p = 2 by multiplying out:

𝐴𝑝 𝐵𝑝 = 𝐴𝐴𝐵𝐵
(𝐴𝐵)𝑝 = 𝐴𝐵𝐴𝐵
Algebra of Matrices

If we know that A2 = 0, this does not tell us that A = 0.

Exercise: find the general form of the matrix A where A2 = 0,


but A ≠ 0.

𝑎 𝑏
𝐴 = #−𝑎2 (
−𝑎
𝑏
More generally, if AB = 0, this does not mean that either A or B
are 0.
Algebra of Matrices

One outcome of the previous result is that if AB = AC, we cannot


say that B = C.

𝐴𝐵 𝐴𝐵
= 𝐴𝐶
= 𝐴𝐶
𝐴𝐵 −
𝐴𝐵𝐴𝐶
−=𝐴𝐶0= 0
𝐴(𝐵𝐴−(𝐵𝐶−
) =𝐶 )0= 0
In standard algebra, we would be able to infer that B – C = 0, but
this no longer holds as both A and (B – C) may be non-zero.
Inverses of Matrices

In standard algebra, the inverse of a number is one which


satisfies the equation aa-1 = 1.
𝑎 𝑏
𝐴=# (
It follows, then, that in matrix algebra the inverse of a matrix is 𝑐 𝑑
one which satisfies the equation AA-1 = I.

𝑑 −𝑏
For a 2 x 2 matrix, we find that the multiplication AB (where B is 𝐵=# )
the matrix shown) gives us: −𝑐 𝑎
𝑎𝑑 − 𝑏𝑐 0 1 0
𝐴𝐵 = $ + = 𝑎𝑑 − 𝑏𝑐 $ +
𝑎𝑑 − 𝑏𝑐 0 0 𝑎𝑑1− 𝑏𝑐
0 0 1
𝐴𝐵 = $ + = 𝑎𝑑 − 𝑏𝑐 $ +
0 the inverse
Therefore, 𝑎𝑑 −of𝑏𝑐
A is given by: 0
1 1 𝑑 −𝑏
−1 $ +
𝐴 =
1 𝑑 −𝑏 𝑎𝑑 − 𝑏𝑐 −𝑐 𝑎
𝐴−1 = $ +
𝑎𝑑 − 𝑏𝑐 −𝑐 𝑎
Inverses of Matrices

The expression ad-bc is known as the determinant of A, or det A.


Thus:
1 𝑑 −𝑏
𝐴−1 = ( -
det 𝐴 −𝑐 𝑎
As long as det A is non-zero, we can find an inverse of A.

A matrix with a non-zero determinant is known as nonsingular.


Example

Find the inverse of the matrix A, if possible. 4 3


𝐴=# (
7 6
1 𝑑 −𝑏
𝐴−1 = ( -
det 𝐴 −𝑐 𝑎
1 6 −3 1 6 −3
𝐴−1 = ' += ' +
24 − 21 −7 4 3 −7 4
Properties of Nonsingular Matrices

Since the identity matrix multiplied by itself gives itself, then we 𝑎 𝑏


can say that the identity matrix is a nonsingular matrix, and that 𝐴=# (
it is its own inverse.
𝑐 𝑑
1 𝑑 −𝑏
𝐴−1 = ( -
The product of any two nonsingular matrices will produce a det 𝐴 −𝑐 𝑎
nonsingular matrix, which can be proved by:

(𝐵−1 𝐴−1 )(𝐴𝐵) = 𝐵−1 (𝐴−1 𝐴)𝐵 = 𝐵−1 𝐼𝑛 𝐵 = 𝐵−1 𝐵 = 𝐼𝑛


Thus, the inverse of a product of two nonsingular matrices is
given by the product of each matrix’s inverse, in reverse order.
This is known as the reversal rule.
3 x 3 Inverses

• For a 3 x 3 matrix proceed as follows:

• Step 1: Determine all nine cofactors and form them into a matrix
• Step 2: Calculate the determinant Det(A)
• Step 3: Transpose the cofactor matrix. That is , write the columns as rows. Then divide by Det(A):

• (Please see class handout for a detailed example)

44
Properties of Nonsingular Matrices

We earlier discussed how AB = AC does not imply that B = C. 𝑎 𝑏


𝐴=# (
However, if A is a nonsingular matrix, then we can say that B = C.
𝑐 𝑑
To see why, note that we can multiply both sides by A-1 to leave 1 𝑑 −𝑏
B = C.
𝐴−1 = ( -
det 𝐴 −𝑐 𝑎
Properties of Nonsingular Matrices

Recall that we had been able to express a system of linear 𝑎11 𝑎12 … 𝑎1𝑛
equations in the form AX = H. We can use the inverse to find a 𝑎21 𝑎22 … 𝑎2𝑛
𝐴𝑋 𝐴=# ⋮ ⋮ ,
solution for all variables𝐴𝑋
in the
𝐴𝑋 = 𝐻 𝐻= 𝐻
=equation: ⋮ ⋱
𝐴𝑋
−1 ( = )𝐻= 𝐴−1 𝐻 𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛
−1𝐴( )𝐴𝑋 −1
𝐴 −1 ( 𝐴𝑋 =
𝐴 −1 𝐴𝑋) = 𝐴 −1𝐻 𝐴−1 𝐻
𝐴 (𝐴 (𝐴𝑋
−1 ) = 𝐴 𝐻
𝐴)𝑋 = −1
−1 −1𝐴 𝐻 𝑥1 𝑏1
(𝐴−1 𝐴)𝑋
(𝐴 𝐴)𝑋 = =𝐴 𝐴−1 𝐻𝐻
−1 −1 𝑥2
(𝐴 𝐴)𝑋 𝑋 = = 𝐴−1 𝐻 𝑏
−1𝐴 𝐻 𝑋=# ⋮ ) 𝐻 = # 2)
𝑋=
𝑋 =𝐴 𝐴−1 𝐻 𝐻 ⋮
−1
Therefore, as long as our𝑋coefficient
= 𝐴 𝐻matrix A is nonsingular, we 𝑥𝑛 𝑏𝑚
can find the value of each variable by using the equation above.
𝐴𝑋 = 𝐻
Example
𝐴−1 (𝐴𝑋) = 𝐴−1 𝐻
Using the formula−1
X = A-1H, find the
−1 solutions to the equations
shown. (𝐴 𝐴)𝑋 = 𝐴 𝐻 3𝑥 + 2𝑦 = 16
𝑋 = 𝐴−1 𝐻 5𝑥 + 4𝑦 = 26
𝑥 1 4 −2 16
!𝑦𝑥$ = 1! 4 −2$ ! 16$
!𝑦$ =2 −5! 3 $ 26
! $
2 −5 3 26
𝑥 1 12 6
!𝑦𝑥$ = 1! 12$ = ! 6$
!𝑦$ =2 −2! $ = −1
! $
2 −2 −1
Therefore, x = 6 and y = -1.
Elementary Matrices

Recall the elementary row operations (EROs).

Each ERO of the matrix A can in fact be represented by pre-


multiplying A by some matrix. These matrices are known as
elementary matrices.

In each case, the elementary matrix can be derived by applying


the ERO to the identity matrix In.
Elementary Matrices

For the Type 1 ERO, (Rp ↔ Rq), we simply swap the


corresponding rows of the identity matrix. 3 −1 2
𝐴 = #4 3 1+
For example, say we wanted to swap row 2 with row 3 in A 2 −5 9
(R2 ↔ R3):

1 0 0 3 −1 2 3 −1 2
!0 0 1$ !4 3 1$ = !2 −5 9$
0 1 0 2 −5 9 4 3 1
Elementary Matrices

For Type 2 EROs (Rp → λRp), we multiply the corresponding row


of In by λ. 3 −1 2
𝐴 = #4 3 1+
For example, say we wanted to multiply row 1 of A by 2 2 −5 9
(R1 → 2R1):

2 0 0 3 −1 2 6 −2 4
!0 1 0% !4 3 1% = !4 3 1%
0 0 1 2 −5 9 2 −5 9
Elementary Matrices

For Type 3 EROs (Rp → Rp + λRq) we once again apply this ERO to
the identity matrix. 3 −1 2
𝐴 = #4 3 1+
For example, say we wanted to add 3 lots of row 1 to row 2 in 2 −5 9
matrix A (R2 → R2 + 3R1)

1 0 0 3 −1 2 3 −1 2
!3 1 0% !4 3 1% = !13 0 7%
0 0 1 2 −5 9 2 −5 9
Elementary Matrices

Suppose that it is possible to use a sequence of EROs to


transform a matrix A into the identity matrix.

If we represent each ERO as applying a matrix E to A, we can (𝐸𝑚 … 𝐸3 𝐸2 𝐸1 )𝐴 = 𝐼𝑛


express this as:

Then it follows that: 𝐴−1 = (𝐸𝑚 … 𝐸3 𝐸2 𝐸1 )

Since A-1In = A-1, we can say that: (𝐸𝑚 … 𝐸3 𝐸2 𝐸1 )𝐼𝑛 = 𝐴−1

This leads to a powerful method for finding a matrix’s inverse.


Elementary Matrices

We use the augmented matrix [A In] and apply a series of EROs to


reduce the left half of the matrix to the identity matrix. The right
half of the matrix will give the inverse.

If A is singular (and cannot be inverted), we will find the left half


of at least one row is all 0s.

𝑎11 𝑎12 𝑎13 1 0 0


[𝐴 𝐼3 ] = (𝑎21 𝑎22 𝑎23 0 1 0-
𝑎31 𝑎32 𝑎33 0 0 1
Example
Find the inverse of the matrix A. (Alternatively you can use the
method explained on slide 47 and in the class handout) 3 4 5
𝐴 = #1 1 1)
3 4 5 1 0 0
[𝐴 𝐼3 ] = (1 1 1 0 1 0. 1 2 4
𝑅1 ⟷ 𝑅2 1 2 4 0 0 1
𝑅
𝑅11 ⟷⟷
⟷𝑅 𝑅
𝑅2 1 1 1 0 1 0
𝑅12 ⟷ 𝑅⟶1 𝑅2 −22 3𝑅1 !3 4 5 1 0 0(
𝑅 𝑅1 ⟷ 𝑅23𝑅 1 2 4 0 0 1
𝑅 2 ⟶ ⟶𝑅 𝑅
𝑅⟷2− −𝑅3𝑅
3𝑅11
𝑅2 𝑅 22 3⟶
1 𝑅2 − 2
⟶𝑅 ⟶
𝑅 −𝑅
2 3𝑅
2 𝑅 3− 3𝑅 −1 𝑅1 1 1 1 1 0
𝑅𝑅2 ⟶ ⟶ 𝑅2 − 𝑅 1
1 0
𝑅23 ⟶
3 ⟶𝑅 𝑅23 −
3 −𝑅 3𝑅
𝑅1 1 !0 1 2 1 −3 0(
1
𝑅3 𝑅𝑅
𝑅31 ⟶
⟶ 𝑅

𝑅
−3 1
3 𝑅 −1 𝑅𝑅 − 𝑅12 0 1 3 0 −1 1
𝑅
𝑅𝑅 1 ⟶
3

⟶ 𝑅
𝑅𝑅1−
3
−− 𝑅
𝑅𝑅21
𝑅1 𝑅 𝑅13 ⟶ 𝑅−
𝑅13𝑅−− 𝑅𝑅2212 1 0 −1 −1 4 0
1 3 1 3
⟶ ⟶
𝑅
𝑅1 ⟶
𝑅
1 𝑅 −𝑅
2 !0 1 2 1 −3 0(
𝑅𝑅 3 ⟶ ⟶
⟶ 𝑅
𝑅𝑅3−
1
−− 𝑅
𝑅𝑅
22 −2 6 1
𝑅3 𝑅𝑅
𝑅3311 ⟶
⟶ ⟶
𝑅
⟶ 3
𝑅−
𝑅
𝑅3311𝑅−+𝑅𝑅2223 0 0 1 −1 2 1
−2 𝑅
𝑅2 1 0 0 −2 6 1 −1
𝑅𝑅
3 ⟶ 𝑅 3+ 𝐴 =%3 −7 −2*
𝑅 1 ⟶ 𝑅11 + 𝑅𝑅332 !0 1 0 3 −7 −2(

⟶ 𝑅𝑅 +− 𝑅
1 1 3
𝑅
𝑅
𝑅1 𝑅⟶ 1
3
2 ⟶ ⟶ 𝑅 3

𝑅1 𝑅+2 𝑅+3 𝑅 3 2𝑅 −1 2 1
𝑅
𝑅 𝑅
1
2 ⟶ ⟶ ⟶ 𝑅
𝑅 21 −
𝑅 − +2𝑅
2𝑅𝑅
33 0 0 1 −1 2 1
𝑅2 𝑅 2 ⟶ 𝑅2 𝑅 2 − 2𝑅
2 1 2 1 3
𝑅⟶⟶
2 2 𝑅− 2𝑅 3
3 3
− 2𝑅
Summary

A matrix is an array of numerical values.

Each individual number in the matrix is known as an entry.

Each horizontal line of entries is known as a row. 𝑎11 𝑎12 𝑎13 𝑎14
𝐴 = #𝑎21 𝑎22 𝑎23 𝑎24 )
Each vertical line of entries is known as a column.
𝑎31 𝑎32 𝑎33 𝑎34
Each entry is denoted by aij, where i is the row of the entry and j
is the column.

The dimension of a matrix is given by m x n, where m is the


number of rows and n is the number of columns.
Summary

Special matrices are row matrices, column matrices, square


matrices and zero matrices.

Addition and subtraction can only be carried out between


matrices of the same dimensions, whilst any matrix can be 𝑎11 𝑎12 𝑎13 𝑎14
multiplied by a scalar. 𝐴 = #𝑎21 𝑎22 𝑎23 𝑎24 )
𝑎31 𝑎32 𝑎33 𝑎34
Two matrices are equal if and only if all corresponding entries are
equal between the two matrices.
Summary

Elementary row operations (EROs) are operations that can be


applied solely to a row in a matrix.

The Type 1 ERO is swapping two rows, denoted by Rp ↔ Rq.


𝑎11 𝑎12 𝑎13 𝑎14
The Type 2 ERO is multiplying an individual row by a scalar, 𝐴 = #𝑎21 𝑎22 𝑎23 𝑎24 )
denoted by Rp → λRp.
𝑎31 𝑎32 𝑎33 𝑎34
The Type 3 ERO is adding to a row another row multiplied by a
scalar, denoted by Rp → Rp + λRq.

The Type 3 ERO can be used to clear a column so that all-but-one


entries are 0.
Summary

We can use an augmented matrix to represent a system of linear


equations using the form shown below.

𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1


𝑎11 𝑎12 … 𝑎1𝑛 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2 𝑎 𝑎22 … 𝑎2𝑛 𝑏2
[𝐴 𝐻] = ' 21 1
𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1 ⋮ ⋮ ⋱ ⋮ ⋮
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + 𝑎𝑚3 𝑥3 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 = 𝑏𝑚 𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛 𝑏𝑚
Summary

By reducing an augmented matrix to a echelon matrix, by using


Gaussian elimination, we can find the solutions of the
corresponding linear equations.
𝑎11 𝑎12 … 𝑎1𝑛 𝑏1
Sometimes we won’t find exact numerical solutions for the
𝑎 𝑎22 … 𝑎2𝑛 𝑏2
equations, so we provide a general solution. [𝐴 𝐻] = ' 21 1
⋮ ⋮ ⋱ ⋮ ⋮
Not all systems of linear equations can be solved, these will lead 𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛 𝑏𝑚
to inconsistent solutions.
Summary

Matrix multiplication gives a new matrix (AB) where each entry is


the scalar product of each row of A with each column of B.

We can use the method below to (a) check that the


multiplication is defined and (b) find the dimensions of AB.

𝑎11 𝑎12 … 𝑎1𝑚 𝑏11 𝑏12 … 𝑏1𝑛


𝑎21 𝑎22 … 𝑎2𝑚 𝑏 𝑏22 … 𝑏2𝑛
𝐴=# ⋮ ⋮ ⋱ ⋮ , 𝐵 = # 21 ,
⋮ ⋮ ⋱ ⋮
𝑎𝑙1 𝑎𝑙2 … 𝑎𝑙𝑚 𝑏𝑚1 𝑏𝑚2 … 𝑏𝑚𝑛

lxm mxn

lxn
Summary

Matrix multiplication is:


•associative A(BC) = (AB)C
•distributive A(B + C) = AB + AC
•not commutative AB does not always equal BA

However, two individual matrices can commute if AB = BA.


Summary

The identity matrix is a matrix that is all 0s, except for the main
diagonal where each value is 1.

The identity matrix acts as 1 in matrix multiplication. Specifically, 1 0 0


InA = AIn = A. 𝐼3 = $0 1 0'
0 0 1
We can use algebra for expressions involving matrices. However,
since matrix multiplication is not commutative, we have to be
careful.
Summary

The inverse of a matrix is defined as a matrix that can be


multiplied by A to give the identity matrix.

For a 2 x 2 matrix we can use the following formula:

−1
1 𝑑 −𝑏
𝐴 = ( -
det 𝐴 −𝑐 𝑎

For larger matrices, we can augment the identity matrix to A and


perform EROs until we convert A into the identity matrix.
intostudy.com/stirling

You might also like