matrix algebra

39
Matrix Algebra (Recap) (for MSc & PhD Business, Management & Finance Students) Lecturer: Farzad Javidanrad First Draft: Sep. 2013 Revised: Sep. 2014 Basic level

Upload: farzad-javidanrad

Post on 17-Jul-2015

229 views

Category:

Education


5 download

TRANSCRIPT

Page 1: Matrix algebra

Matrix Algebra (Recap)(for MSc & PhD Business, Management & Finance Students)

Lecturer: Farzad Javidanrad

First Draft: Sep. 2013

Revised: Sep. 2014

Basic level

Page 2: Matrix algebra

Linear Transformation

• Matrix Algebra developed in relation to linear transformations such as the following:

𝑎𝑥 + 𝑏𝑦 = 𝑋𝑐𝑥 + 𝑑𝑦 = 𝑌

Where 𝑎, 𝑏, 𝑐 and 𝑑 are real numbers. This transformation introduces a function(mapping) by which an ordered pair 𝑥, 𝑦 in 𝑥𝑜𝑦 plane transformed (associated) to another ordered pair (𝑋, 𝑌) in 𝑋𝑂𝑌 plane.

𝒙 𝑿

𝒀𝒚

𝒐 𝑶

This linear transformation can be done through the coefficients of 𝑥 and 𝑦 . The square array 𝑎 𝑏𝑐 𝑑

represents this

transformation which is one among many other transformations. Such an array is called matrix.

Page 3: Matrix algebra

Matrix Algebra

• Definition: A matrix is a rectangular or square array of elements (usually numbers) arranged in rows and columns.

• Matrices are usually shown by capital and bold letters such as A, B, etc. Matrix A with 3 rows and 2 columns is shown by 𝑨𝟑×𝟐 and matrix B with m rows and n columns is shown by 𝑩𝒎×𝒏. Their elements are shown by small letters with an index indicating the position of the element in the matrix.

• 𝐴3×2 =

𝑎11𝑎21𝑎31

𝑎12𝑎22𝑎32

𝐵𝑚×𝑛 =

𝑏11𝑏21⋮𝑏𝑚1

𝑏12𝑏22⋮𝑏𝑚2

𝑏13…𝑏23…⋮ ⋯𝑏𝑚3⋯

𝑏1𝑛𝑏2𝑛⋮

𝑏𝑚𝑛

Page 4: Matrix algebra

Matrix Algebra

• There are other ways of showing a matrix:

𝑩 = 𝑏𝑖𝑗 𝑚×𝑛𝒐𝒓 𝑩𝒎×𝒏

The Order of a Matrix:

• The size and the shape of a matrix is given by its orderwhich is the multiplication of number of rows and number of columns.

• In the previous examples the order of A is 3 × 2 and the order of B is 𝑚 × 𝑛.

• If 𝑚 = 𝑛 then the matrix is called a square matrix of order 𝑚 (𝑜𝑟 𝑛).

Page 5: Matrix algebra

Vectors & Scalars

• A matrix with just one row or one column is called vector.

𝐴1×3 = 2 −10 3.5 is a row (horizontal) vector.

𝐵4×1 =

2−1.657.25

is a column (vertical) vector.

• In matrix algebra any real number is called scalar. So, a scalar in matrix algebra is a 1 × 1 matrix.

Page 6: Matrix algebra

Types of MatricesNull (zero) Matrix:

If all elements of a matrix is zero the matrix is called null or zero matrix and it is shown by 𝟎 .

𝐴2×2 =0 00 0

𝐶2×3 =0 0 00 0 0

Diagonal Matrix:

A square matrix which have at least one nonzero element on its main diagonal and zeros elsewhere is a diagonal matrix.

𝐴3×3 =3 0 00 −1 00 0 2

Main Diagonal𝒊 = 𝒋 → 𝒂𝒊𝒋 ≠ 𝟎

𝒊 ≠ 𝒋 → 𝒂𝒊𝒋 = 𝟎

Page 7: Matrix algebra

Types of MatricesIdentity (unit) Matrix:

A diagonal matrix whose all elements on the main diagonal are equal to one is called identity or unit matrix. A unit matrix is usually shown by letter I and its order.

𝐼2×2 = 𝐼2 =1 00 1

𝐼3×3 = 𝐼3 =1 0 00 1 00 0 1

Scalar Matrix:

In a diagonal matrix if all elements are equal the matrix is called a scalar matrix.

𝐴3×3 =3 0 00 3 00 0 3

Page 8: Matrix algebra

Types of MatricesTranspose Matrix:For a matrix 𝑨𝒎×𝒏 the transpose is defined as 𝑨′𝒏×𝒎 (in some books 𝑨𝒏×𝒎

𝑻 ) where the rows and columns are interchanged.

𝐴2×4 =

1 43 −210

−31.2

→ 𝐴′4×2 =143−2

1−3

01.2

• Transposed of a row vector is a column vector and vice versa.

𝑋3×1 =154

→ 𝑋′1×3 = 1 5 4

Properties of Transpose Matrix:

By the definition of transpose matrix we can conclude 𝑨′ ′ = 𝑨.

By the definition, 𝑰′ = 𝑰. This property is true for all diagonal matrices.

For a square matrix 𝑨, if 𝑨′ = 𝑨 , then 𝑨 is a symmetric matrix. 1 0.50.5 3

𝒌𝑨 ′ = 𝒌𝑨′

Page 9: Matrix algebra

Types of MatricesTriangular Matrices:

If all elements above the main diagonal of a square matrix are zero the matrix is called “lower triangular matrix”.

e.g. 𝐴 =2 0 00 −1 04 3 5

if 𝑖 < 𝑗 , 𝑎𝑖𝑗 = 0

Alternatively, If all elements under the main diagonal of a square matrix are zero the matrix is called “upper triangular matrix”.

e.g. 𝐵 =1 −3 1 2

0 4 70 0 −6

if 𝑖 > 𝑗 , 𝑎𝑖𝑗 = 0

Page 10: Matrix algebra

Types of MatricesSymmetric Matrix:

A square matrix is symmetric if 𝑨 = 𝑨′. This means that the elements above the main diagonal in the matrix are the mirror image of elements under the main diagonal (the main diagonal works as a mirror)

𝐴3×3 =3 1.2 21.2 −1 0

2 0 2

Equality in matrices:

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

𝑨 = 𝑩 ↔ 𝑜𝑟𝑑𝑒𝑟 𝑨 = 𝑜𝑟𝑑𝑒𝑟(𝑩)

∀𝑖, 𝑗 → 𝑎𝑖𝑗 = 𝑏𝑖𝑗

Page 11: Matrix algebra

Matrix OperationScalar Multiplication:

If 𝑘 is a scalar then

𝑘. 𝑨 = 𝑘. 𝑎𝑖𝑗 𝑚×𝑛

This means that all elements of the matrix are multiplied by the scalar 𝑘.

Matrix Addition & Subtraction:

Addition and subtraction are defined for the matrices of the same order. It is not possible to add or subtract matrices from different orders. In both cases the corresponding elements are added or subtracted:

𝑨𝒎×𝒏 ± 𝑩𝒎×𝒏 = 𝑎𝑖𝑗 ± 𝑏𝑖𝑗 𝑚×𝑛

Page 12: Matrix algebra

Matrix Operations

e.g. 𝐴 =3 1 −22 4 1

and 𝐵 =7 −10 45 0 3

𝐴 + 𝐵 =10 −9 27 4 4

𝐴 − 𝐵 =−4 11 −6−3 4 −2

Properties of Addition & Subtraction:

𝑨 + 𝑩 = 𝑩 + 𝑨 Commutative law

𝑨 ± 𝑩 ± 𝑪 = 𝑨 ± 𝑩 ± 𝑪 Associative law

𝒌. 𝑨 ± 𝑩 = 𝒌𝑨 ± 𝒌𝑩 (𝒌 is a scalar)

𝑨 ± 𝑩 ′ = 𝑨′ ± 𝑩′ can be extended to “n” matrices

Page 13: Matrix algebra

Matrix Operations• Matrix Multiplication:Multiplication of two matrices 𝑨 and 𝑩, in the form of 𝑨 × 𝑩 or 𝑨𝑩, is possible if the number of columns in 𝑨 is equal to the number of rows in 𝑩. The result of this multiplication is another matrix 𝑪 where the number of its rows is equal to the number of rows in 𝑨 and number of its columns is equal to the number of columns in 𝑩; that is:

𝑨𝒎×𝒏 × 𝑩𝒏×𝒑 = 𝑪𝒎×𝒑

Elements of 𝑪 can be calculated by adding some multiplications; multiplications of the elements in the i-th row of 𝑨 by the corresponding elements in the j-th column of 𝑩, that is:

𝑪𝒊𝒋 = 𝑘=1𝑛 𝑎𝑖𝑘𝑏𝑘𝑗 where

𝑖 = 1,2,⋯ ,𝑚𝑗 = 1,2,⋯ , 𝑝

Page 14: Matrix algebra

Matrix Operations

• For example, matrix 𝑨𝟑×𝟑 =𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖

cannot be multiplied by a

horizontal vector 𝑿𝟏×𝟑 = 𝑥 𝑦 𝑧 but it can be multiplied by its

transpose which is a vertical vector; 𝑿′𝟑×𝟏 =𝑥𝑦𝑧

and the result is:

AX =𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖

𝑥𝑦𝑧

=

𝑎𝑥 + 𝑏𝑦 + 𝑐𝑧𝑑𝑥 + 𝑒𝑦 + 𝑓𝑧𝑔𝑥 + ℎ𝑦 + 𝑖𝑧

• In the above example:

𝑿𝑿′ = 𝑥2 + 𝑦2 + 𝑧2 which is a scalar but 𝑿′𝑿 =

𝑥2 𝑥𝑦 𝑥𝑧

𝑦𝑥 𝑦2 𝑦𝑧

𝑧𝑥 𝑧𝑦 𝑧2

which is a symmetric matrix, why?

Page 15: Matrix algebra

Matrix OperationsProperties of Matrix Multiplication:

In general, 𝑨𝑩 ≠ 𝑩𝑨 if both exist, but there are special cases that

this property is not true.

If 𝑰 is an identity matrix 𝑰𝑩 = 𝑩𝑰 = 𝑩.

𝑨 𝑩 + 𝑪 = 𝑨𝑩 + 𝑨𝑪 and 𝑩 + 𝑪 𝑨 = 𝑩𝑨 + 𝑪𝑨

𝑨 𝑩𝑪 = 𝑨𝑩 𝑪

If 𝑨𝑩 exist then 𝑨𝑩 ′ = 𝑩′𝑨′ (this can be extended to more than 2

matrices, i.e.: 𝑨𝑩𝑪 ′ = 𝑪′𝑩′𝑨′

From 𝑨𝑩 = 𝟎 we cannot conclude necessarily that 𝑨 = 𝟎𝑜𝑟 𝑩 = 𝟎.*

From 𝑨𝑩 = 𝑨𝑪 we cannot conclude necessarily that 𝑩 = 𝑪.**

Page 16: Matrix algebra

Determinant of a Matrix

• Consider the system of simultaneous equations 𝒂𝒙 + 𝒃𝒚 = 𝒆𝒄𝒙 + 𝒅𝒚 = 𝒇

Where 𝒂, 𝒃,… . , 𝒆, 𝒇 are constants of the system. If the coefficients of 𝒙 and 𝒚 in the first equation (i.e. 𝒂 and 𝒃 )have a linear relationship with the coefficients of the second equation (i.e. 𝒄 and 𝒅 ), the system either does not have a unique solutions for 𝒙 and 𝒚 (when 𝒆, 𝒇 also have the same linear relationship) or there is no solution at all (the system is not solvable as the equations are in contrary with each other).

• If 𝑎

𝑐=

𝑏

𝑑→ 𝑎𝑑 = 𝑏𝑐 or 𝑎𝑑 − 𝑏𝑐 = 0 it means the

coefficients have a linear relationship and there is no unique solutions for 𝑥 and 𝑦. The value of 𝑎𝑑 − 𝑏𝑐determines whether a system of simultaneous equations have a unique solutions or not.

Page 17: Matrix algebra

Determinant of a Matrix

o For the system of simultaneous equations A: 2𝑥 + 3𝑦 = 124𝑥 + 6𝑦 = 24

and

B: 2𝑥 + 3𝑦 = 124𝑥 + 6𝑦 = −18

we have:

2

4=3

6→ 2 × 6 = 3 × 4 𝒐𝒓 2 × 6 − 3 × 4 = 0

So, both systems fail to provide unique solutions for 𝑥 and 𝑦 but the difference between them is that system A provides infinite solutions (because there are, in fact, one equation with two variables, which geometrically means two lines coincide) but the equations in system B are in contrary with each other (geometrically means they are two parallel lines and do not cross each other).

x

y2𝑥 + 3𝑦 = 124𝑥 + 6𝑦 = 24

2𝑥 + 3𝑦 = 12

4𝑥 + 6𝑦 = −18

x

y

Infinite solutions

No solution

Page 18: Matrix algebra

Determinant of a Matrix

• for matrix 𝑨𝟐×𝟐 =𝑎 𝑏𝑐 𝑑

, the value of 𝑎𝑑 − 𝑏𝑐 is called

“determinant” of the matrix and it is shown by det 𝑨 or simply 𝑨 .

𝑨𝟐×𝟐=𝑎 𝑏𝑐 𝑑

→ det 𝑨 = 𝑨 = 𝑎𝑑 − 𝑏𝑐

• To every square matrix we can correspond a scalar which is called the determinant of the matrix. So, determinant of a matrix represents a function.

• What about if the square matrix is 𝟑 × 𝟑 or even 𝒏 × 𝒏?

In order to obtain the determinant of matrices of higher orders than 2 we need to introduce two concepts:

Minors

Cofactors

Page 19: Matrix algebra

Determinant of Matrices of Higher Orders than 2

• Minors: For every element (such as 𝑎𝑖𝑗) of a square matrix there

is a corresponding determinant, called “minor of 𝒂𝒊𝒋” (shown by

𝑀𝑖𝑗) derived from ignoring the elements in the same row and

column of 𝑎𝑖𝑗 (i.e. 𝑖 and 𝑗).

• For matrix

𝑎11 𝑎12 𝑎13𝑎21 𝑎22 𝑎23𝑎31 𝑎32 𝑎33

, minors are:

Minor of 𝑎11 = 𝑀11 =𝑎22 𝑎23𝑎32 𝑎33

= 𝑎22𝑎33 − 𝑎23𝑎32

Minor of 𝑎12 = 𝑀12 =𝑎21 𝑎23𝑎31 𝑎33

= 𝑎21𝑎33 − 𝑎23𝑎31

Minor of 𝑎13 = 𝑀13 =𝑎21 𝑎22𝑎31 𝑎32

= 𝑎21𝑎32 − 𝑎22𝑎31

Minor of 𝑎21 = 𝑀21 =𝑎12 𝑎13𝑎32 𝑎33

= 𝑎12𝑎33 − 𝑎13𝑎32

Page 20: Matrix algebra

Determinant of Matrices of Higher Orders than 2

• Minor of 𝑎22 = 𝑀22 =𝑎11 𝑎13𝑎31 𝑎33

= 𝑎11𝑎33 − 𝑎13𝑎31

• ………………………………

• ………………………………

• Minor of 𝑎33 = 𝑀33 =𝑎11 𝑎12𝑎21 𝑎22

= 𝑎11𝑎22 − 𝑎12𝑎21

• Cofactors: Cofactors of each element 𝑎𝑖𝑗, shown by 𝐶𝑖𝑗, are minors with a

sign depending on the row and column of the element. i.e.:

𝐶𝑖𝑗 = −1 𝑖+𝑗𝑀𝑖𝑗

So,

the cofactor of 𝑎11 is 𝑪𝟏𝟏 = −1 1+1𝑀11 = 𝑀11 = 𝑎22𝑎33 − 𝑎23𝑎32And

the cofactor of 𝑎23 is𝑪𝟐𝟑 = −1 2+3𝑀23 = −𝑀23= −(𝑎11𝑎32 − 𝑎12𝑎31) = −𝑎11𝑎32 + 𝑎12𝑎31

Page 21: Matrix algebra

Determinant of Matrices of Higher Orders than 2

• The matrix of cofactors can be shown as:

𝐶 =

𝐶11 𝐶12 𝐶13𝐶21 𝐶22 𝐶23𝐶31 𝐶32 𝐶33

=

𝑀11 −𝑀12 𝑀13

−𝑀21 𝑀22 −𝑀23

𝑀31 −𝑀32 𝑀33

Now, we can define and calculate the determinant of a matrix with order higher than two.

Definition: Determinant of a 𝑛 × 𝑛 matrix is the summation of products between elements of any row (or any column ) and their corresponding cofactors. i.e.:

For a matrix 𝑨𝒏×𝒏 we can write:

𝑨 = 𝑎11. 𝑪𝟏𝟏 + 𝑎12. 𝑪𝟏𝟐 +⋯+ 𝑎1𝑛 . 𝑪𝟏𝒏 Based on the 1st row

𝑨 = 𝑎1𝑛 . 𝑪𝟏𝒏 + 𝑎2𝑛. 𝑪𝟐𝒏 +⋯+ 𝑎𝑛𝑛 . 𝑪𝒏𝒏 Based on the nth column

Page 22: Matrix algebra

Determinant of Matrices of Higher Orders than 2

o Find the determinant of 𝐀 =

𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖

.

Based on the elimination of rows and columns using the elements of the first row we have:

𝑨 = 𝑎.𝑒 𝑓ℎ 𝑖

− 𝑏.𝑑 𝑓𝑔 𝑖

+ 𝑐.𝑑 𝑒𝑔 ℎ

= 𝑎 𝑒𝑖 − 𝑓ℎ − 𝑏 𝑑𝑖 − 𝑓𝑔 + 𝑐(𝑑ℎ − 𝑒𝑔)

= 𝑎𝑒𝑖 − 𝑎𝑓ℎ − 𝑏𝑑𝑖 + 𝑏𝑓𝑔 + 𝑐𝑑ℎ − 𝑐𝑒𝑔

o The determinant of the unit matrix of order 𝑛 is:

𝑰𝒏×𝒏 = 𝑰𝒏 =

10

0…1⋯

00

⋮ ⋮ ⋯ ⋮0 0… 1

𝑰𝒏 = 𝑰𝒏−𝟏 = ⋯ = 𝑰𝟐 = 1 , why?

Page 23: Matrix algebra

Sarrus’ Rule

• For a matrix 𝐀 =𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖

can be calculated through following steps:

1. Add the first 2 columns of the matrix to the right of the 3rd column:

𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖

𝑎𝑑𝑔

𝑏𝑒ℎ

2. Subtract the sum of the products along the green arrows from the sum of

products along the blue arrows:

𝑨 = 𝑎𝑒𝑖 + 𝑏𝑓𝑔 + 𝑐𝑑ℎ − (𝑐𝑒𝑔 + 𝑎𝑓ℎ + 𝑏𝑑𝑖)

• Note: It is also possible to add the first 2 rows of the matrix to the bottom of

the 3rd row:𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖𝑎 𝑏 𝑐𝑑 𝑒 𝑓

(+) (-)

(+) (-)𝑨 = 𝑎𝑒𝑖 + 𝑏𝑓𝑔 + 𝑐𝑑ℎ − (𝑐𝑒𝑔 + 𝑎𝑓ℎ + 𝑏𝑑𝑖)

Page 24: Matrix algebra

Properties of Determinants1) Transposing a matrix does not change its determinant: 𝑨 = 𝑨′

𝑎 𝑏𝑐 𝑑

=𝑎 𝑐𝑏 𝑑

= 𝑎𝑑 − 𝑏𝑐

2) If all elements of a row (or column) of a square matrix are zero the determinant of that matrix is zero. Why?

𝑎 0 2𝑏 0 3𝑐 0 4

= 0

3) If two rows (or columns) of a square matrix have the same values or make a linear relationship with each other the determinant of the matrix is zero.

𝒂 𝒃 𝒄𝒂 𝒃 𝒄𝑔 ℎ 𝑖

=𝒂 𝒃 𝒄𝟐𝒂 𝟐𝒃 𝟐𝒄𝑔 ℎ 𝑖

= 0

Page 25: Matrix algebra

Properties of Determinants4) If the elements in a row (or in a column) of a square matrix multiplied by a constant the determinant of the matrix is multiplied by that constant but if the entire elements of a matrix multiplied by a constant the determinant of the matrix multiplied by that constant to the power of the order of the matrix, i.e.

If 𝐀 =𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖

then

𝑘. 𝑎 𝑏 𝑐𝑘. 𝑑 𝑒 𝑓𝑘. 𝑔 ℎ 𝑖

= 𝑘. 𝑨 and 𝑘. 𝑎 𝑘. 𝑏 𝑘. 𝑐𝑘. 𝑑 𝑘. 𝑒 𝑘. 𝑓𝑘. 𝑔 𝑘. ℎ 𝑘. 𝑖

=

𝑘3.𝑎 𝑏 𝑐𝑑 𝑒 𝑓𝑔 ℎ 𝑖

𝑜𝑟 𝑘. 𝑨 = 𝑘3. 𝑨

If matrix 𝑨 was from

order of 𝑛 then

𝑘. 𝑨 = 𝑘𝑛. 𝑨

Page 26: Matrix algebra

Properties of Determinants5) For the square matrices 𝑨 and 𝑩 with the same orders

𝑨𝑩 = 𝑨 . 𝑩

6) If two rows (or two columns) of a square matrix are interchanged the determinant of the matrix is multiplied by -1.

𝑎 𝑏𝑐 𝑑

= −𝑐 𝑑𝑎 𝑏

𝑖𝑛𝑡𝑒𝑟𝑐ℎ𝑎𝑛𝑔𝑖𝑛𝑔 𝑡𝑤𝑜 𝑟𝑜𝑤𝑠

7) If the elements of a row (or a column) of a square matrix is the sum of two row (column) vectors, the determinant of the matrix can be written as the sum of two determinants; each corresponded to one of the vectors, i.e.:

𝑎 + 𝜇 𝑏 + 𝜃𝑐 𝑑

=𝑎 𝑏𝑐 𝑑

+𝜇 𝜃𝑐 𝑑

𝑎 + 𝜇 𝑏𝑐 + 𝜃 𝑑

=𝑎 𝑏𝑐 𝑑

+𝜇 𝑏𝜃 𝑑

Page 27: Matrix algebra

8) Adding or subtracting a scalar multiple of a row (or a column) to another row (column) does not change the determinant of the matrix.

𝑎 + 𝑘. 𝑏 𝑏𝑐 + 𝑘. 𝑑 𝑑

=𝑎 𝑏𝑐 𝑑

+ 𝑘.𝑏 𝑏𝑑 𝑑

=

0

𝑎 𝑏𝑐 𝑑

9) Determinant of a triangular, diagonal and scalar matrix is the multiplication of the elements on the main diagonal.

Triangular matrix :1 4 30 −2 50 0 3

= 1 × −2 × 3 = −6

Diagonal matrix: 1 0 00 −2 00 0 3

= 1 × −2 × 3 = −6

Scalar Matrix:−2 0 00 −2 00 0 −2

= −2 × 𝐼3 = −2 3 × 𝑰𝟑1

= −8

Properties of Determinants

Page 28: Matrix algebra

• The last two properties are sometimes used to facilitate the calculation of determinant of a matrix.

o If 𝑨 =2 3 −11 4 0−3 5 4

find 𝑨 .

According to the property No. 8, if we substitute the last row (𝑅3) by 4𝑅1 + 𝑅3 (multiplying the first row by 4 and adding it to the third row) the result of the determinant does not change. So:

2 3 −11 4 0−3 5 4

=2 3 −11 4 05 17 0

= −1 ×1 45 17

= 3

• These type of operations are called elementary row/column operations and they are useful to solve a system of simultaneous equations . These types of operations will be discussed later.

Properties of Determinants

Page 29: Matrix algebra

• The concept of inverse is very important in all branches of algebra. Inverse of a real number, inverse of a function are just different aspects of this concept.

• In matrix algebra the inverse of a square matrix 𝑨, which is shown by 𝑨−𝟏(read 𝑨 inverse), is the matrix of the same order such that:

𝑨𝑨−𝟏 = 𝑨−𝟏𝑨 = 𝑰

Where 𝑰 is an identity matrix of the same order.

Note: Not all square matrices have an invers but if a square matrix is invertible, the inverse matrix is unique.

Some properties of inverse matrices are as following:

𝑨−𝟏−𝟏

= 𝑨

𝑨𝑩 −𝟏 = 𝑩−𝟏𝑨−𝟏

𝑨′ −𝟏 = 𝑨−𝟏′

𝑨𝑨−𝟏 = 𝑰 → 𝑨 . 𝑨−𝟏 = 1 → 𝑨−𝟏 =1

𝑨

Invers of a Matrix

Page 30: Matrix algebra

A square matrix 𝑨 is invertible if and only if 𝑨 ≠ 0. This is necessary and sufficient condition for a square matrix to have an inverse. If 𝑨 ≠ 0, the matrix is called non-singular and singular otherwise.

To find the inverse of a function we can follow one of these methods:

a) Using the Definition:

o Find the inverse of the matrix 𝑨 =2 45 5

.

As 𝑨 = −10, so, the inverse exists. According to the definition, if

𝑨−𝟏 =𝑎 𝑏𝑐 𝑑

then : 𝐀𝑨−𝟏 =2 45 5

𝑎 𝑏𝑐 𝑑

=1 00 1

= 𝑰. By

multiplication we have:2𝑎 + 4𝑐 2𝑏 + 4𝑑5𝑎 + 5𝑐 5𝑏 + 5𝑑

=1 00 1

By solving the system of four simultaneous equations with four variables we will have : 𝑎 = −0.5 , 𝑏 = −0.5 , 𝑐 = 0.5 and 𝑑 = −0.5.

Finding the Inverse of a Square Matrix

Page 31: Matrix algebra

So, 𝑨−𝟏 =−0.5 −0.50.5 −0.5

. This method can be difficult for matrices of

orders bigger than two.

b) Gauss Method (Gaussian Elimination Method):

A prerequisite for using this method is to know the concept of elementary raw (column) operations. If a matrix is associated to a system of simultaneous linear equations (called coefficients matrix) elementary raw (column)operations help to solve the system and find the set of solutions easily. They can be also used to calculate the determinant of a square matrix or to find its inverse, in case the matrix is invertible.

Three types of these operations are:

I. Row (column) Switching: A row (column) in a matrix can be switched with another row (column), i.e. 𝑅𝑖 ↔ 𝑅𝑗 (𝐶𝑖 ↔ 𝐶𝑗)

Finding the Inverse of a Square Matrix

Page 32: Matrix algebra

II. Row (column) Multiplication: all elements in a row (column) can be multiplied by a non-zero scalar and be replaced by that, i.e. 𝑘. 𝑅𝑖 → 𝑅𝑖 (𝑘. 𝐶𝑖 → 𝐶𝑖)

III. Row (column) Addition/Subtraction: A row (column) can be replaced by the sum of that row (column) and a multiple of another row (column), i.e. 𝑅𝑖 ± 𝑘. 𝑅𝑗 → 𝑅𝑖 (𝐶𝑖 ± 𝑘. 𝐶𝑗 → 𝐶𝑖)

• The third elementary operation (no. III) does not change the determinant of a matrix. Why?(Hint: focus on the properties of determinants)

• In order to find the inverse of a square matrix 𝑨 through the Gaussian elimination method we attach an identity matrix 𝑰 (of the same order) to 𝑨 and then by using a sequence of elementary row operations on both of them matrix 𝑨 step by step transforms to an identity matrix and the identity matrix transforms to 𝑨−𝟏, i.e.

𝑨 ⋮ 𝑰 → 𝑰 ⋮ 𝑨−𝟏

Why?(Hint: focus on the relationship between 𝑨, 𝑰 and 𝑨−𝟏)

Finding the Inverse of a Square Matrix

Page 33: Matrix algebra

o Find the inverse of the matrix 𝑨 =2 3 41 6 9−1 0 1

, if it is invertible.

Applying an elementary column operation, 𝑨 can be easily calculated:

𝐶3 + 𝐶1 → 𝐶1 : 2 3 41 6 9−1 0 1

→6 3 410 6 90 0 1

; so, based on the

expansion of the last row 𝑨 = 6. Therefore, matrix 𝑨 is invertible.

To find 𝑨−𝟏, we need to make 𝑨 ⋮ 𝑰 and then follow the following sequence of elementary row operations:2 3 41 6 9−1 0 1

1 0 00 1 00 0 1

𝑅1↔𝑅21 6 92 3 4−1 0 1

0 1 01 0 00 0 1

−2𝑅1+𝑅2→𝑅2𝑅1+𝑅3→𝑅3

1 6 90 −9 −140 6 10

0 1 01 −2 00 1 1

−19 𝑅2→𝑅2

1 6 90 1 14

9

0 6 10

0 1 0−19

29 0

0 1 1

−6𝑅2+𝑅1→𝑅1−6𝑅2+𝑅3→𝑅3

1 0 −13

0 1 149

0 0 23

23

−13 0

−19

29 0

23

−13

1

Finding the Inverse of a Square Matrix

Page 34: Matrix algebra

1 0 −13

0 1 149

0 0 23

23

−13

0−19

29

023

−13

1

32𝑅3→𝑅3

1 0 −13

0 1 149

0 0 1

23

−13

0−19

29

0

1−12

32

−14

9𝑅3+𝑅2→𝑅2

1

3𝑅3+𝑅1→𝑅1 1 0 0

0 1 00 0 1

1 −12

12

−53

1 −73

1 −12

32

• If the matrix 𝑨 in the above example was representing a coefficients matrix in the system of simultaneous equations such as the following

2𝑥 + 3𝑦 + 4𝑧 = 5𝑥 + 6𝑦 + 9𝑧 = 0−𝑥 + 𝑧 = −4

the system could be written in the matrix form as 𝑨𝑿 = 𝑩, i.e.

2 3 41 6 9−1 0 1

𝑥𝑦𝑧

=50−4

• And by using 𝑨−𝟏, the unique set of solutions for the variables can be found, because:

𝑨𝑿 = 𝑩⟹ 𝑨−𝟏𝑨𝑿 = 𝑨−𝟏𝑩⟹ 𝑿 = 𝑨−𝟏𝑩

Finding the Inverse of a Square Matrix

𝑨−𝟏𝑰

Page 35: Matrix algebra

So, 𝑥𝑦𝑧

=

1 −1

2

1

2−5

31 −7

3

1 −1

2

3

2

50−4

=31−1

→ 𝑥 = 3𝑦 = 1𝑧 = −1

.

• The same elementary raw operations could be used to reach to the same results:

𝑨 𝑩 → 𝑨−𝟏𝑨 𝑨−𝟏𝑩 → 𝑰 𝑿

c) Adjoint (Adjugate) Matrix Method:

Recall from the definition of determinant of a 3 × 3 matrix :

𝑨 = 𝑎11. 𝑪𝟏𝟏 + 𝑎12. 𝑪𝟏𝟐 + 𝑎13. 𝑪𝟏𝟑

And we know that if elements in a row (column) are multiplied by non-associated cofactors the sum of these products is zero. Using these properties, the multiplication of square matrix 𝑨 by its transposed cofactor matrix (called adjoint matrix, shown by adj(A))yields a scalar matrix:

Finding the Inverse of a Square Matrix

Based on the elements of the 1st row

Page 36: Matrix algebra

𝑨. 𝑎𝑑𝑗 𝑨 =

𝑎11 𝑎12 𝑎13𝑎21 𝑎22 𝑎23𝑎31 𝑎32 𝑎33

𝐶11 𝐶21 𝐶31𝐶12 𝐶22 𝐶32𝐶13 𝐶23 𝐶33

=𝑨 0 00 𝑨 00 0 𝑨

= 𝑨 . 𝑰𝟑

So, 𝑨. 𝑎𝑑𝑗 𝑨 = 𝑨 . 𝑰

or

𝑰 =𝑨. 𝑎𝑑𝑗(𝑨)

𝑨

By multiplying both sides by 𝑨−𝟏, we have:

𝑨−𝟏 =𝑎𝑑𝑗(𝑨)

𝑨

=1

𝑨. 𝑎𝑑𝑗 𝑨 =

1

𝑨

𝐶11 𝐶21 𝐶31𝐶12 𝐶22 𝐶32𝐶13 𝐶23 𝐶33

Finding the Inverse of a Square Matrix

Page 37: Matrix algebra

o Find the inverse of matrix 𝑨 =4 −12 −3

.

As 𝑨 = −10, the matrix is invertible. The cofactor matrix for 𝑨 can be easily

found as 𝑪 =−3 −21 4

and its transposed is 𝑪′ =−3 1−2 4

.

So,

𝑨−𝟏 =1

−10

−3 1−2 4

=0.3 −0.10.2 −0.4

• Clearly, the adjoint of a 2 × 2 matrix can easily be obtained by interchanging the elements on the main diagonal (without changing the sign) and change the sign of elements on the other diagonal (without changing their place), i.e.

𝑩 =𝑎 𝑏𝑐 𝑑

→ 𝑎𝑑𝑗 𝑩 =𝑑 −𝑏−𝑐 𝑎

So,

𝑩−𝟏 =

𝑑

𝑩

−𝑏

𝑩−𝑐

𝑩

𝑎

𝑩

Finding the Inverse of a Square Matrix

Page 38: Matrix algebra

• Apart from the matrix’s inverse method, Cramer’s rule provides a simple method of solving a simultaneous equations.

• According to this rule, the value of any variable in the system of equation (provided that the system has a unique solution for each variable), can be obtained through the division of two determinants, i.e.:

𝑥 =𝑨𝑥𝑨

, 𝑦 =𝑨𝑦𝑨

and 𝑧 =𝑨𝑧𝑨

Where 𝑨𝑥 , 𝑨𝑦 and 𝑨𝑧 are specific determinants. If in 𝑨 the

column vector associated to the coefficients of any of variables is replaced by the column vector of constants, we can obtain these specific determinants.

Cramer’s Rule

Page 39: Matrix algebra

• For example, for the system of equation2 3 41 6 9−1 0 1

𝑥𝑦𝑧

=50−4

the

Cramer’s rule can be applied as:

𝑥 =

5 3 4

0 6 9

−4 0 12 3 4

1 6 9

−1 0 1

= 3 , 𝑦 =

2 5 4

1 0 9

−1 −4 12 3 4

1 6 9

−1 0 1

= 1

and

𝑧 =

2 3 5

1 6 0

−1 0 −42 3 4

1 6 9

−1 0 1

= −1

Cramer’s Rule