Open in TheBrain

Elementary row operations on matrices

Wild Egg mathematics courses

2.83K subscribers

SUBSCRIBED

We introduce the three basic kinds of row operations on the augmented matrix of a system of linear equations that form the basis for row reduction, or Gaussian elimination.

00:01

hello everyone I'm normal inverter okay

00:04

so we're gonna talk about elementary row

00:07

operations on matrices so this is moving

00:09

towards explaining role reduction or

00:13

Gaussian elimination a systematic

00:15

approach to solving systems of linear

00:18

equations okay so the first thing to do

00:22

is to remind you that we had a matrix

00:24

formulation for a system of equations so

00:27

here for example is system of three

00:32

equations in four variables X 1 X 2 X 3

00:35

X 4 there's three equations and

00:37

correspondingly here below it you see an

00:40

Augmented matrix for that system ok and

00:45

we see just on the left hand side is the

00:48

encoding of all the coefficients that

00:51

appear on the left hand side of the

00:52

equations and then on the right hand

00:54

side here the column 1 2 3 is just a

00:57

column that appearing on the right-hand

00:58

side of this system of equations so the

01:01

idea is that instead of working with the

01:03

equations we're going to work with the

01:05

Augmented matrix instead and the

01:07

advantage of that obviously is that we

01:09

don't have to keep writing down the

01:11

variables X 1 X 2 X 3 X 4 because the

01:15

positions of those variables is already

01:17

kind of clear by the way the matrix

01:19

organizes things okay so we can just

01:22

work with these numbers and then

01:24

interpret what we get in terms of the

01:27

original equations now the strategy is

01:32

that we are going to exploit we use

01:40

three different types three different

01:45

transformations or operations on

01:48

augmented matrices

01:58

and these operations that we're going to

02:03

use have the crucial property that they

02:06

do not change the solution set okay so

02:10

whatever is a solution to the original

02:14

system will still be a solution to any

02:17

of these modified matrices that we're

02:20

going to create and conversely any

02:24

solution of a modified Augmented matrix

02:28

that we get is also a solution to the

02:31

original system so that's the key point

02:33

that we're making transformations that

02:35

don't ultimately change the set of

02:39

solutions to our system so we use three

02:45

different operations on a committed

02:46

matrices and maybe you should say

02:49

matrices that do not that do not change

02:57

the solutions okay and these are our so

03:08

the first one is is interchange of any

03:17

two rows and the second one is going to

03:22

be adding multiple one row to another

03:35

the third one is going to be multiplying

03:39

a row by a nonzero number so these are

03:53

going to be called these are these are

03:58

going to be called elementary elementary

04:04

row operations

04:08

and they're going to be acting on

04:10

augmented matrices for a system we also

04:17

going to introduce some kind of notation

04:20

for for these so let us have an example

04:25

or two so let's look at the first one

04:27

interchange of two rows okay so suppose

04:35

we have some Augmented matrix

04:37

maybe 2 4 3 7 1 0 2 minus 5 and 4 1 half

04:47

3 2 I remind you that the numbers

04:51

involved here don't always have to be

04:54

integers usually we will illustrate

04:55

things with integers but we don't

04:58

actually officially have to and the fact

05:00

later on we'll see that fractions do

05:03

naturally appear ok so what might we

05:07

want to do you might want to interchange

05:10

two rows and our notation is that our

05:14

first row will denote by r1 and our

05:18

second row by r2 and our third row by r3

05:21

okay that's the convention that we'll

05:23

use so now we're going to make a

05:25

transformation and we're going to change

05:27

this to the following 1 1 0 - -5 - 4 3 7

05:36

4 1/2 3/2 ok what have I done here I

05:41

have interchanged r1 and r2 and we'll

05:46

denote that with this little symbol here

05:51

r12 double arrow r2 that's telling us

05:57

that we're interchanging Row 1 and Row 2

05:59

of the original matrix to get this new

06:02

matrix now that's pretty clearly not

06:06

going to change the solutions to this

06:08

system because remember each one of

06:11

these rows corresponds to a linear

06:14

equation in in this case x1 x2 x3

06:17

perhaps or we don't actually know what

06:19

the

06:20

Able's are maybe the variables on x y&z

06:22

but whatever they are the three

06:24

equations that we have at the end in the

06:27

second Matrix is exactly the same as the

06:30

equations that we have in the first

06:32

matrix it's just that they're in a

06:33

different order so it just changed the

06:36

order of the the equations that's not

06:38

going to change you know what the

06:40

solutions are why might we want to do

06:46

this so we might want to do this because

06:51

it's very convenient to have a one in

06:54

the top of column that we're working on

06:57

we're going to be working on kind of

06:58

clearing elements from columns and

07:02

having a one there makes it particularly

07:04

convenient to remove by subsequent row

07:09

operations the entries below that so

07:12

it's a kind of a way of organizing

07:14

bookkeeping the row reduction algorithm

07:18

okay that's why we do this kind of

07:21

things usually to bring more convenient

07:25

entry to the top of some column okay

07:29

it's a relatively simple operation the

07:32

second one is the most used so it is

07:37

adding a multiple of one row to another

07:44

adding a multiple of one row to another

07:55

so let's illustrate that say I'll start

07:58

with that matrix that we just had in the

08:00

previous example 1 0 2 minus 5 2 4 3 7 &

08:07

4 1 half 3 2 and what I'm going to do is

08:14

I'm going to transform this by changing

08:20

the second row and I going to change the

08:23

second row by adding a multiple of the

08:28

first row to it in order to get rid of

08:30

that 2 that's sitting

08:32

they're underneath of the one okay so

08:34

that's what our plan is to get rid of

08:36

that to to make it a zero and way we're

08:40

going to do that is we're gonna actually

08:41

add minus two times the first row to the

08:47

second row and the way we're going to

08:49

write that is in kind of computer

08:52

language so we're going to write our two

08:54

equals this is like the new are two on

08:58

the left-hand side of the equation

09:00

that's late you should interpret that is

09:02

equal to the old are two minus two times

09:07

R one so then we're gonna get a new

09:13

system the first row is not going to

09:16

change but the second row is because

09:19

we're going to subtract twice the first

09:22

row from it so 2 minus 2 is 0 4 minus 2

09:27

times 0 is still 4 3 minus 2 times 2 is

09:32

minus 1 we also have to do it on the

09:34

right hand side 7 minus 2 times minus 5

09:38

he is a total of 17 can the third row

09:43

well we're not doing anything to that so

09:45

we'll leave it where it is okay so let's

09:49

make sure that we understand what this

09:51

notation means here so we have added

09:59

minus 2 times the first row or first row

10:08

are 1 2 the second row are 2 and to

10:17

understand what's really going on there

10:19

so let's have a look at what it looks

10:22

like at the level of equations so at the

10:28

level of equations maybe we'll use say

10:34

using say XY and Santa's are variables

10:37

so the first equation that we originally

10:40

had was X plus 2z equals minus 5

10:45

and then 2x plus 4y plus 3z equals 7 and

10:50

4 X plus 1/2 y plus 3z equals 2 and then

10:56

after we've performed this we still have

11:00

X plus 2z equals minus 5 and now we have

11:04

2x minus 2x is 0 x plus 4y minus 3z

11:12

equals 17 and we still have 4 X plus 1/2

11:16

y plus 3z equals 2 so we performed well

11:23

actually this level it's perhaps safer

11:25

to say that we have just worked on the

11:28

level of the equations so equation 2

11:35

equals the old equation 2 minus 2 times

11:39

the equation 1 that might be a

11:42

corresponding thing in terms of the

11:43

equations rather than rows and we can

11:48

see that this is not going to change the

11:52

solution set why is that so note that

12:00

any vector say XYZ which satisfies the

12:12

first system also satisfies the second

12:22

system because if X Y is that satisfy

12:29

these three equations here then these

12:33

three equations here are obtained from

12:35

these ones by just combining them so

12:37

these ones these new ones over here are

12:40

just going to still be satisfied if x

12:43

y&z cents by the original set but what

12:47

about the converse question how do we

12:49

know that anything that satisfies the

12:53

second equation also satisfies the first

12:57

equation

12:58

so it's sort of the converse so

13:00

conversely we can see that any solution

13:08

of the second system is also a solution

13:28

to the first system because because the

13:38

operation is invertible because the

13:42

operation that we've just done is

13:46

invertible which is another way of

13:49

saying reversible we can undo it how

13:56

would we undo that so how would we go

13:59

back and recreate the first system from

14:04

the second system let's think about that

14:07

I'm going to do that over here in in

14:10

blue all right suppose that we started

14:12

with the system on the right hand side

14:14

this one here and we wanted to go to

14:17

this one over here let's do it in red

14:20

okay what would we do well the first

14:25

equation is the way it is the third

14:28

equation is the weight is only the

14:30

second equation is being changed and

14:32

what actually is happening to the second

14:34

equation the new second equation that is

14:36

the one over here is equal to the old

14:38

second equation plus two times the first

14:43

equation you see that right so if we

14:48

take this equation the second one over

14:50

here and we add twice the first one over

14:53

here

14:54

then we're going to recover the second

14:57

equation over on the original side

14:59

that's explaining how to undo or how to

15:04

invert or how to reverse this second

15:07

elementary row operation and that's the

15:11

reason

15:11

why it's also the case that if we have a

15:14

solution to the second one the one on

15:16

the right hand side then we'll also get

15:19

a solution to the left hand one because

15:21

the left and one is obtained from the

15:23

right hand one by just taking equations

15:26

and adding multiples of one to the other

15:31

so this is a kind of the key the key

15:36

operation this is the one that you do

15:38

like you know 90% of the time really

15:41

okay so we're going to be using this

15:44

operation quite a lot but there's also a

15:46

third one the third operation is to

15:50

multiply a row by a non-zero number okay

16:04

so let's go back to the last matrix that

16:08

we had the 1 0 2 minus 5 1 0 2 minus 5

16:14

and then the next one was 0 4 minus 1

16:20

1704 1 minus 17 then the last one was

16:23

for 1/2 3 2 4 1 half 3 2 okay

16:32

so let us transform this by using this

16:35

third kind of elementary row operation

16:38

and why might we want to do that well

16:42

usually it's to normalize the numbers

16:45

that appear sometimes it's because we

16:48

want to remove fractions sometimes it's

16:53

because we want to create a 1 in a

16:56

particular spot so let's illustrate that

16:59

here because let's have a look at this

17:01

third row which we haven't done anything

17:03

with yet so let's take the third row

17:05

actually we're going to use notation for

17:12

row so Row 3 let's take Row 3 and the

17:17

new Row 3 is going to be 2 times the old

17:21

Row 3

17:23

yeah so this equation that I've just

17:26

written is not really a good

17:27

mathematical equation it's the kind of

17:29

equation that a computer scientist might

17:31

use in those of a programming

17:32

environment so the left-hand side is

17:34

referring to the new Row 3 while the

17:36

right hand side refers to the old Row 3

17:38

and say that the new Row 3 is gonna be

17:41

twice the whole of Row 3 ok so what do

17:44

we get out of this well the first row

17:46

stays where it is and the second row

17:50

stays where it is and the third row is

17:53

multiplied by 2 so 8 1 6 4 so we

18:03

performed that that operation and we

18:07

also note that this is also this is also

18:13

invertible or reversible to reverse it

18:23

we would just multiply by the inverse of

18:27

what we multiplied previously by the

18:34

inverse of the reciprocal and for that

18:40

of course it is important that we're

18:43

agreeing to multiply row by a nonzero

18:45

number you are not allowed you are not

18:49

allowed to multiply a row by 0 that's

18:52

effectively killing that row then you

18:54

losing information it's no longer the

18:56

same kind of system so that's not an

18:59

allowed operation because we want the

19:02

the set of solutions to stay the same

19:05

right in this case it's kind of obvious

19:07

that it stays the same if you just take

19:08

an equation and you multiply both left

19:10

and right hand sides by the same number

19:13

in this case 2 the solutions are not

19:16

changing it just becomes more convenient

19:20

for the algorithm to use that equation

19:24

in that altered form okay so these are

19:28

the three elementary row operations and

19:31

we are now going to then exploit them to

19:36

show how to solve systems of linear

19:39

equations so I'll do that next time

Attachments