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

Matrix algebra

Jul 17, 2015

Download

Education

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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