background image

 

1

INTRODUCTION TO MATRICES,
SUM and PRODUCT of MATRICES

Lecture 4

background image

 

2

SYSTEMS OF LINEAR EQUATIONS

background image

 

3

SYSTEMS OF LINEAR EQUATIONS

A system of 

3 equations with 3 unknowns

x, y, z.

A system of  

2 equations with  6 unknowns

x, y, z, u, v, w.

A system of 

4 eqautions with 2 

unknowns

x, y.

4

x

x

9

x

5

x

5

x

6

x

2

15

x

x

x

4

x

2

x

7

x

4

6

5

4

3

2

1

6

5

4

3

2

1

49

x

7

x

21

0

x

x

8

x

2

x

5

7

x

x

3

2

1

2

1

2

1

2

1

7

x

x

2

x

2

1

x

x

3

x

6

1

x

x

x

2

3

2

1

3

2

1

3

2

1

background image

 

4

The number of solutions

background image

 

5

Which mathematical operations 

do not

 change the solution of a system?

2. We can multiply any equation by some number,  e.g. the first eqaution by ‘

3

’:

e.g.  for 

  x +  y - 3z 
= 4
2x +2y +  z 
= 6
2x - 7y – 2z 
=9

3

x + 

3

y - 

9

z = 

12

2x +2y +   z = 
6
2x - 7y – 2z = 9

3. We can add equations to one another e.g. the second equation to the third one

  x +  y - 3z = 
4
2x +2y +  z = 
6

4

-

 

5

  z = 

15

  2x +2y +  z  
=  6
  2x -  7y – 2z = 
9

_______________________________________-___

  4x – 5y – z  = 
15

1. We can swap  equations, e.g  the first with the third:

2x - 7y – 2z 
=9
2x +2y +  z 
= 6
  x +  y - 3z 
= 4

+

background image

 

6

- denotes the coefficient standing in the 

3

-rd equation by the 

4

-th unknown  x

4

 

                                                                           row                         column 



m

n

mn

2

2

m

1

1

m

2

n

n

2

2

22

1

21

1

n

n

1

2

12

1

11

b

x

a

x

a

x

a

b

x

a

x

a

x

a

b

x

a

x

a

x

a

...

.

..........

..........

..........

..........

...

...

The general form of  

m

  linear equations in 

n

  unknowns is 

Where the first subscript denotes the row number and the second the column number.

m

Equation

2

Equation

1

Equation

E

E

E

m

2

1

...

..........

.....





a

3

4

 

a

mn

background image

 

7

The mentioned operations are called elementary row operations. Generally we can

background image

 

8

Any other operation which 

does not change

 the solution is 

a combination of the obove ones !!!! 

background image

 

9

Using 

elementary row operations

 we can transform a system of equations into

an upper triangular form:

  x +   y +  z = 1
2x + 3y +4z = 4
3x + 4y +6z = 5

(-2)E

1

+E

2

  x +   y +  z = 1
          y +2z = 2
3x + 4y +6z = 5

(-3)E

1

+E

3

  x +   y +  z = 1
          y +2z = 4
          y +3z = 2

(-1)E

2

+E

3

  x +   y +  z = 1
          y +2z = 2
                 z = 0

Backward subtitution gives  z = 0 , y = 2, x = -1

So the unique solution is  (x, y, z) = (-1, 2, 0)

The system has been triangularized

.

background image

 

10

The Gaussian Eimination Algorithm is a  

SYSTEMATIC  SEQUENCE OF  ELEMENTARY ROW 
OPERATIONS 
 

(the most efficient sequence) which allows us to solve the system.

http://www.math.ucla.edu/~tao/resource/general/115a.3.02f/Gauss.html

background image

 

11

The Gaussian Eimination Algorithm is a   

systematic  

sequence

 

of elementary row operations

 (the most efficient 

sequence).

The process of Gaussian elimination has two parts. 

The first part (Forward Elimination) reduces a given system to 
either upper triangular form, or results in a degenerate equation 
with no solution, indicating the system has no solution. This is 
accomplished through the use of elementary operations. 

The second step (Backward Elimination) uses back-substitution to 
find the solution of the system above. 

background image

 

12

The Gaussian Eimination Algorithm is a   systematic  
sequence
 of elementary row operations (the most efficient 
sequence).

First

 you eliminate the 

first unknown

 using the 

first equation

 from all 

but the first equation,

Second

 you eliminate the 

second unknown

 

using the 

second 

equation

 

from all but the first and second equation

Third

 you eliminate the 

third unknown

 

using the 

third equation

 

from 

all but the first, second and  third equation

etc.

                             You obtain the upper triangular form.

F

o

rw

a

rd

 e

li

m

in

a

ti

o

n

B

a

c

k

w

a

rd

 E

li

m

in

a

ti

o

n

1.

2.

Next you perform the same procedure starting from the last equation

background image

 

13

Gaussian Elimination Steps:

 

1. 

Write the augmented matrix for the system of linear 

equations. 

2. Use elementary row operations on the augmented 

matrix [A|b] to transform A into upper triangular 
form. 

If a zero is located on the diagonal, switch the 

rows until a nonzero is in that place. If you are 
unable to do so, stop; the system has either infinite 
or no solutions

3. Use back substitution to find the solution of the 

problem.

background image

 

14

THE MATRIX

background image

 

15

The coefficient matrix of the above system is

The size of  A  is   

n

m

Where  

a

ij

 

 are called the coefficients of the system

b

i

 

 are the constants or right-hand side R-HS.

.

A

mn

m2

m1

2n

22

21

1n

12

11

a

...

a

a

...

...

...

...

a

...

a

a

a

...

a

a

(read:  „m by n”). 

A matrix  

A

  with elements  

a

ij

  

is often denoted as  [ 

a

ij

] or 

a

ij

]

mxn

.

background image

 

16

The 

augmented matrix

  A|B of  the above system 

.

...

...

...

...

...

...

...

...

m

mn

m

m

n

n

b

b

b

a

a

a

a

a

a

a

a

a

B

A

2

1

2

1

2

22

21

1

12

11

background image

 

17

how?

OUR GOAL

background image

 

18

TYPES OF MATRICES

MORE DEFINITIONS

background image

 

19

1. A square matrix of order 

n

  is a matrix of order  

n x n

 

   otherwise its a rectangular matrix 

Types of matrices:

2. A diagonal matrix of order n  is a square matrix of order n  which 
has all elements lying outside the diagonal equal to  0.

nn

a

a

a

0

0

0

0

0

0

22

11

background image

 

20

3. The unit (identity) matrix of order  n
 is a diagonal matrix which has  all elements equal to one. 

1

0

0

0

1

0

0

0

1

n

I

4. A column matrix is a matrix of order mx1.

5. A vector matrix is a matrix or order  1xn.

6. A lower triangular matrix is a matrix which has 
all the elements lying over the main diagonal equal to zero. 

7. An upper triangular matrix  is a matrix which has 
all the elements lying under the main diagonal equal to zero. 

nn

n

n

a

a

a

a

a

a

0

0

0

2

22

1

12

11

An identity matrix may be denoted  I

n

 , I , 1 

 or  E  (the latter being an abbreviation
for the German term "Einheitsmatrix„) 

..

..

..

..

..

..

background image

 

21

Definition 
Matrices  A and  B are said to be equal (B if
1.  they are of the same size and 
2.  each element of  A  is equal to the corresponding element of B:  

a

ik

 = b

ik

 

 

     for  i = 1, ... , m and k = 1, ... ,n.

8. The zero matrix of order mxn  (sometimes called the null matrix)
denoted by  0 or  0

mxn

  is a matrix of order  mxn  which has 

all elements equal to zero. 

0

0

0

0

0

0

0

0

0

background image

 

22

]

a

[

A

T
ij

T

,

a

a

ji

T
ij

Definition
Let A = [ a

ij

] be of order  m

x

n, then the matrix of order  n

x

m

denoted by  

A

T

where 

is said to be the transpose  of matrix A.

The transpose matrix is  obtained by interchanging 
rows with 
columns.

The transpose of a matrix

 

1

≤ 

i 

  m, 

  j  

 n, 

(A

T

)

T

 = A

background image

 

23

ADDING AND 

MULTIPLYING MATRICES

background image

 

24

Definition
The sum
 of matrices  A = a

ij

]  and  B = b

ij

] of 

order  n

is the matrix  C = c

ij

 ]  of order  n  such that

                                c

ij

 = a

ij 

+ b

ij

,

      1≤ i ≤ m, 1 ≤ 

≤ n.

Definition
The product 
of a matrix A = [ a

ij

 ] and a real number c

 R

is the matrix:
                                     cA =c a

ij

 ].

To multiply a matrix  A by a number c, we multiply every 
element of the matrix by the number c. 

background image

 

25

1

z

y

x

c

b

a

1

cz

by

ax

In  'equation  language'

First we shall multiply two matrices:one row matrix  

R

  and one column matrix 

C





n

2

1

n

2

1

c

c

c

C

and

r

r

r

R

)

,

,

,

(

THE PRODUCT

background image

 

26

Example

The product of  2x2 matrices

background image

 

27

8

7

8

7

:

4

6

5

6

5

:

3

4

3

4

3

:

2

2

1

2

1

:

1

4

4

22

21

12

11

4

22

4

21

4

12

4

11

3

3

22

21

12

11

3

22

3

21

3

12

3

11

2

2

22

21

12

11

2

22

2

21

2

12

2

11

1

1

22

21

12

11

1

22

1

21

1

12

1

11

y

x

a

a

a

a

y

a

x

a

y

a

x

a

Equation

y

x

a

a

a

a

y

a

x

a

y

a

x

a

Equation

y

x

a

a

a

a

y

a

x

a

y

a

x

a

Equation

y

x

a

a

a

a

y

a

x

a

y

a

x

a

Equation

8

6

4

2

7

5

3

1

:

4

3

2

1

4

3

2

1

22

21

12

11

y

y

y

y

x

x

x

x

a

a

a

a

Equations

All

Application

background image

 

28

,

b

a

...

b

a

b

a

c

pj

ip

j

2

2

i

j

1

1

i

ij

.

b

a

]

c

[

B

A

n

m

p

1

k

kj

ik

mxn

ij

Definition
Let  matrix  A = [ a

ij

]  be of order m

x

p  and  matrix  B = [ b

jk

]  be of order  p

x

n.

The product of matrices  

A

 and 

B

 is the matrix  C[ c

ij

 ] of order  m

x

n :

where  

 i  

≤ 

m,   1 

 j  

 

n,

Product of  two matrices of arbitrary size

background image

 

29

In case and  

fail to 'match

' i.e. is  m

x

p  and B is  q

x

n and 

  p ≠ q     then no product is defined.

CAUTION

background image

 

30

CAUTION !!!

BA

AB 

 2

3

1

2

3

2

1

1

8

5

3

1

A

B

,

3

1

5

4

B

A

A=

B =

a · b = a · c     a, b  are   Real 
Numbers
     b = c

Also the cancellation law fails for matrices i.e

background image

 

31

CAUTION

0

B

A

but neither  

A 

= 0  or   

= 0

1

1

1

1

B

1

1

1

1

A

2

2

2

2

A

B

Note that 

background image

 

32

For matrices  

A

 and 

B

 we obtain:

( A + B )

= A

T

  + B

T

;

( A  B )

T

 = B

T

  A

T

.

background image

 

33

             The properties of matrix operations

The operations of sums and products have the 

following properties:

•A + B = B + A  (commutative law);

•(A + B) + C = A + (B + C) (associative law);

•A + 0 = 0 + A  where 0 is the zero matrix;

•A 

 (B 

 C) = (A 

 B) 

 C (associative law);

•A 

 (B + C) = A 

 B + A 

 C (first distributive 

law);

•(A + B) 

 C = A 

 C + B 

 C (second distributive 

law);

 Let  A = [ a

ij

]

nxn

  and  I

 be a unit matrix of order 

 n,

 then    

 I

n

 = A = I

n

 

 A.

background image

 

34

7

3

8

3

9

5

6

8

4

3

1

2

A

submatrix of a given matrix 

A

 is an array obtained by deleting any combintaion

of rows and columns from 

A

. 

is a submatrix of  

A

 because 

B

 is a result of deleting the second row and the second

and third columns of  

A

.

DEFINITION

For example, 
let

then

7

3

4

2

B

background image

 

35

Time to finish


Document Outline