noc20-ma54-lec14 - RREF and Inverse

IIT Kanpur July 201
20 followers
2 Video Views·Dec 2, 2023
RREF and Inverse
All right, so let us recall that we had this theorem, which says that given a matrix M
its R R E F is unique, E F is unique, all right, fine. So, all of us are going to get
the same matrix finally, and therefore, this is this is a very important role in understanding
the things. So, let us try to understand this using some example first, example.
So, suppose I have a system A X is equal to B, where A is 3 cross 3 and X is 3 cross 1,
B is also 3 cross 1. So, I have the augmented matrix as A B, fine and suppose my R R E F
is C D, fine. Question is what are the possibilities for C, so question is question, what are the
possibilities for C D, all right, fine. So, let us go by one by one, try to understand
it. Now, this matrix has 3 rows, all right and 4 columns. Now, since it has got 3 rows,
how many pivots can it have, fine. So, let us try to understand that, what the definition
of pivot was that every non-zero row has a pivot, all right, it is not about A, pivot
is with respect to R R E F. So, when you are saying that I am looking at R R E F of A B,
so I am looking at C D. So, I would like to see to see that in this matrix C D, the R
R E F, how many non-zero rows are there. It may happen that all the 3 rows are non-zero
or it may happen that, so all the 3 rows are non-zero, 3 rows of C D are non-zero, that
is the first choice that I have. Second choice, only 2 rows of C D are non-zero and the C
D is only 1 row of C D is non-zero. So, I am not taking the case here, when the whole
matrix A as well as B is 0, that I am not taking. I am assuming also that for every
variable or the unknown x y z, I have at least 1 non-zero entry with me, fine. So, that assumption
is there with me that all the variables x y and z or all the unknowns x y z have at
least 1 non-zero coefficients with it, is that ok? So, that I can talk of things here,
fine. So, I have got 3 cases, this matrix has A
has 3 rows, augmented matrix joins with me, so there are 3 rows and 4 columns as per as
C D is concerned, C D is in R R E F. So, it can have all the 3 rows as non-zero, only
2 rows as non-zero and only 1 row as non-zero. So, in the first case what happens is, I am
assuming that all the 3 rows are non-zero. So, what are the possible pivots? So, the
possible pivots are the pivots, pivotal columns will be in A, either the first column is a
pivot, second column is a pivot, third column is a pivot or first is a pivot, second is
a pivot, fourth is a pivot, fine. Or it can happen that the first is a pivot, third is
a pivot, fourth is a pivot or second is a pivot, third is a pivot, fourth is a pivot,
fine. So, there are 4 columns, out of that any 3 can be a pivotal column. So, pivotal
columns could be 1 2 3, 1 2 4, 1 3 4 and 2 3 4. So, let us write the corresponding matrices
for us. So, if this is the pivot 1 2 3, then I need to get identity with me, this is what
we had understand, understood that in the previous class that whenever we have a pivot,
each pivot gives me some form of identity. So, since there are 3 here, so I will get
identity here in the first 3 columns and therefore, D will be something like D 1, D 2, D 3 something
here and this will give me that the solution as X as D 1, Y as D 2 and Z as D 3. So, I
get a solution directly here and this is a unique solution, is that okay? So, I have
a pivot, there are 3 pivots and these 3 pivots, they are at position 1 2 and 3. So, they correspond
to the variable X, Y, Z and therefore, I get a unique solution. What happens at 1 2 4,
1 3 4 and 2 3 4? Let us try to understand that part, fine.
So, here it says that 1 2 4, so 1 0 0, 2 is 0 1 0 and the fourth one it says that 0
0 1, fine. So, see again here that pivotal or the RREF is so important that the ones
they are going to the right, fine, the ladder like idea is coming to play, fine. So, what
will happen to the third one here? Third one here could be anything here, but it has
to be a 0 here, because if it was a non-zero entry, if this entry was non-zero, so if this
was non-zero, this would have become a pivot, non-zero will imply a pivot, alright. So,
that will give you a contradiction. So, therefore, this entry has to be a 0, there is no other
choice for us, alright, fine and this entry whatever it is that we are not bothered about,
but this is how it is going to look like. So, here I would like you to see that this
equation it corresponds to saying that x times 0 times x plus 0 times y plus 0 times z is
1 and this implies no solution. I cannot find any value of x, y and z such that 0 times
x plus 0 times y plus 0 times z is 1, fine. So, in this case, I do not get a solution.
What happens to 1, 3, 4? Now, let us look at 1, 3, 4. So, I have got 1 here, 3 is the
second one and fourth is the last one. Again, I would like to understand what is this entry?
Can I say that this entry has to be a 0, because if this entry was non-zero, again this will
become a pivot and that will again contradict that C D is in R R E F, alright. So, this
is important that we are doing everything with respect to C D. So, this has to be 0,
because if it was non-zero, this becomes a pivot, this has to go up and things like that,
fine. This will not be a ladder like. So, this is not a pivot. So, it has to be a 0
here, because this is a pivot that I have got here. These are the pivots. So, this is
a pivot. Everything on the left of that is supposed to be 0, fine. This is what the idea
was. In every non-zero row, the first non-zero entry is a pivot, alright. So, if you see
again, I will get 0 times x plus 0 times y plus 0 times z as 1 and therefore, no solution
here, is that ok? So, again the same argument. Now, what happens to this one, that case 2,
4, here 2 is the first one. So, it is 1 here, 0 here, 0 here, 3 is the second one and this
is the third one that I have got. Here again, if I look at, this has to be 0, because if
this was not 0, then again this should have become a pivot and would have contradicted
that C D is in R R E F, alright. So, therefore, what we see here is that, this
again, this case again leads me to the idea that 0 times x plus 0 times y plus 0 times
z is 1, which has no solution, alright. So, you can see that from R R E F, I am able to
conclude when the system will have no solution as such, fine. There are other ways also.
Now, let us look at what happens to the case B and C. So, the case B is, we have got only
2 rows, which are non-zero. So, there are only 2 pivots, fine. So, now, case B, only
2 rows of C D are non-zero. So, again there are 4 columns. So, out of 4 columns, any 2
columns can be pivotal columns. So, the pivotal columns will be 6 of them. So, either 1, 2
or 1, 3, 1, 4, 2, 3, 2, 4 and 3, 4. So, let us look at these things separately. So, what
I know is that, there are only 2 rows, which are non-zero rows and the 0 row are supposed
to be in the bottom. So, last one is 0 here. 1, 2 here, basically means that I have got
1, 0 here, 0, 1 here. There are no more pivots. So, there are some entries here that we do
not know what they are, fine. Similarly, if I look at 1, 3, I have got 0, 0, 0, 0,
1, 0 here, fine. I also know that 3 is in the pivot. So, 1 is here, there is a 0 here.
I do not know what these are. Can I say that this entry has to be 0? Because if this was
non-zero, this would have become a pivot. So, this has to be 0, but I do not know what
it is here, fine. Similarly, for this entry 2, 3, again look at it, the last one has to
be 0, fine. Here, there is a 0 here, because there is no pivot at the first column. Second
column, there is a pivot and third column, there is a pivot here, fine and I do not know
what they are. These are the choices that I have, but we had also assumed, if you recall,
we had assumed that every variable comes with a non-zero coefficient, all right. Since
we had assumed that every variable comes with a non-zero coefficient, so this case is not
allowed basically because of this part, because it says that all the coefficients of x, all
the coefficients of x are 0, which is not allowed for me. So, I can forego that part,
all right. Similarly, for this 2, 4 and 3, 4, I will
have to forego because that is not allowed for me, fine. So, now, let us look at what
is 1, 4 for me. 1, 4 basically means I have got 0 here, 0 here, 0 here, 0 here, there
is a 1 here and there is a 1 here, fine. Now, this is a pivot, it means that all other entry
in that row is 0 and therefore, this again gives me 0 times x plus 0 times y plus 0 times
z is 1. So, I have got no solution, fine. And here, these entries could be anything
that I am not bothered, but this is what is going to happen. So, I would like you to see
that I have these issues that I need to take care of, fine.
And in the cases when I have got this and this, fine, you can see that I will have infinite
number of solutions. Why will I have infinite number of solutions? Let us look at it nicely.
So, let me put these numbers here, some numbers here. So, let me put alpha here, beta here,
d 2 here and d 3 here, all right. So, this equation tells me that x plus beta z is equal
to d 3 and the second equation tells me it is y plus alpha z is equal to d 2, fine. These
two together, I can write it as solution as x is equal to d 3 minus beta z and y as
d 2 minus alpha z. So, therefore, if I write x as x, y, z, this gives me x as d 3 minus
beta z, d 2 minus alpha z and z, which gives me d 3, d 2, 0 as one solution plus z times
minus beta minus alpha 0, fine. And this z is arbitrary and therefore, I can keep replacing
the value of z by 0, 1, 2, e, pi, whatever real number I can think of and therefore,
this gives me infinite number of solutions. This is very important for us to observe and
understand that things become very nice when I have got RREF form. I am able to say just
by looking at the matrix itself, the RREF, whether it will have infinite number of solutions
or not, because look at this part, the third one, beta and alpha, this does not have a
pivot. Similarly, here, if I look at, there is no pivot here, alright. So, when you look
at the solution set, we will talk about it there. I would also like you to understand
here is that, look at how we have got this beta and alpha, fine. So, in this expression,
there was beta, alpha and 0 coming into play. Here, we have got minus beta minus alpha and
this 0 is coming from the z part that we have here, fine. Sorry, this should have been 1.
So, there is a mistake there. So, let me rewrite it correctly. There has to be a 1 here, there
has to be a 1 here, because it is z here. So, look at here, it is z here. So, you have
to be careful. So, z here, when we look at the systems, we will say that the pivotal
columns, these are the pivotal columns, they will correspond to what are called basic variables,
alright. And these, which are free variables, so these, which are not pivot, they are called
free variables. So, we will come to that afterwards. Let us not get into that part, but what we
are saying is that, this gives us all the ideas about solution set in general, alright.
So, given a system, go to the augmented matrix, compute its RREF and you have the solution
as it is. I have not looked at the case, when there is only one non-zero row, please do
it yourself, alright. So, now, from here, I would like you to understand these small
small theorems, which are very important. So, let me write that theorem and they follow
from the idea that the RREF of a matrix is unique, alright, fine.
Let B is equal to EA for some elementary matrix E, alright. Then, RREF of B is same
as RREF. So, whenever I multiply by an elementary matrix, alright, RREF does not change, fine,
because B and A are row equivalent. We had just said that, if two matrices are row equivalent,
RREF is the same, this is what we are writing and nothing else, fine. You can prove it yourself,
this is 1, 2. Now, the next thing that we would like to say is that, I already said
that, if A and B are row equivalent, then there exists an invertible matrix P, such
that P times A is equal to B. We did it for the RREF, because when I am saying that they
are row equivalent, I can obtain one from the other by multiplying elementary matrices.
The elementary matrices are invertible. So, P is product of elementary matrices, which
are invertible, alright. So, therefore, P is also invertible. So, I am able to get one
invertible matrix, fine. This is the most important part, which will help us to define
the rank and things like that and proceed us. So, let F is equal to RREF of A, alright,
it is given to me and I have matrix B, which has not all the rows of A, but not all the
columns of A, I have got only certain columns of, is that okay? So, I have just picked up
some S columns, the first S columns, alright. So, B consists of the first S columns of A,
fine. Question is, what can you say about RREF? Alright, that is the question that we
have here. I know that RREF of A is F, B is nothing but the matrix, which comes as the
first S columns of A. I have just picked up the first S columns. So, what I am doing
is that, I have an augmented matrix A, B, I am just looking at the coefficient part,
I am forgetting about B in some sense, alright. So, what we are saying here is that, if I
pick the first S columns, first is very important, I am not picking any S columns, it is the
first S columns that I am picking up, in that case, the RREF of B will be nothing but, so
RREF of B will be equal to, just look at the first S columns of F, alright, alright,
then this will be happen. Why this is true? Because again, the idea is that, RREF of a
matrix is unique, alright. So, note that, since F is RREF of A, F has all the properties
or this sub matrix, which consists of the first S columns, first S columns of F, also
has all the properties of being an RREF and therefore, this result follows, is that okay.
So, I would like you to keep track of this, this is very important idea that you have,
fine, that you are just picking up certain things, certain, first certain columns and
everything is nice for you, alright. So, next thing we would like to see is that, how do
I get the inverse and then relate invertibility with RREF and so on, fine. So, finding the
inverse, finding the inverse of a square matrix. So, what we have learnt here is that, given
a system AX is equal to B, we can apply RREF to it and get a matrix CD, fine. So, applying
it to the augmented matrix and I am getting CD here, fine and I can solve it as it is,
there is no issue of that. So, in place of just solving system AX is
equal to B, I would like to solve the system AX is equal to E1, which is 1 0 0, the first
column of the identity matrix. Similarly, I would like to solve the system AX is equal
to E2, which is nothing but 0 1 0 0 0, the second column of I2 and so on, till the last
AX is equal to EN, which is 0 0 0 and 1, fine, which is nothing but last column, I wrote
it wrongly, this here. So, these are the columns, not the rows, but anyway they are same, but
transpose of that, so first column, second column and so on, fine.
So, let us try to understand what exactly I am trying to do, what I am saying is that,
I want to solve a system, which is AX is equal to E1, AX is equal to E2, AX is equal to EN.
I want to solve n system of equations, suppose the solution here is X1, solution here is
X2, solution here is Xn, suppose, all right, suppose these are the solutions for me, solution
is X1, X2 and Xn, fine. Let us write the matrix B as X1, X2, Xn, I am writing B as
whatever the solutions are there for each one of them, I want to compute what is A times
B, fine. So, A times B is nothing but A times X1, X2, Xn, now by matrix multiplication it
is same as A times X1, A times X2, A times Xn, which is same as, X1 was the solution
of E1, AX is equal to E1, so AX1 is E1, AX2 is E2 and AXn is EN and what were EN, E1,
E2, EN, they were nothing but the columns, E1 was the first column of identity, E2 was
the second column, EN was the last column, so I do get back identity here, fine.
So, what we see here is that A times B is indeed identity, fine. So, let us try to understand
this what exactly I am trying to say, so what I am saying is that in place of solving the
system CD, sorry AB, the augmented matrix, I would like to solve the system A and identity
here, I want to solve, so this is an n cross n matrix, this is also an n cross n matrix
and I want to solve it, is that okay. So, when I want to solve it, the idea is to apply
the Gauss Jordan method and get the RREF, fine. So, what we will do is, we will multiply
this by, so what we have seen here is that getting an RREF is same as multiplying by
an invertible matrix, fine which is nothing but product of elementary matrices as such,
fine. So, I apply elementary matrices and so apply elementary matrices and get here
some R here and some matrix say E here, alright, fine.
When I apply the RREF, elementary matrix, I will get this, fine. What does this mean
here? So, when I am applying elementary matrices, they are invertible, so I am multiplying certain
matrices E 1, E 2, E k, is that okay. Now, as I said, I would like to write it as some
P, fine. So, what we are getting here is that P applied to this part is equal to R applied
to E, is that okay, fine. So, from here, what do I get here is that P times A is R
and P is same as E, this is very important for us. Look at here, P times identity is
E, so this is very important that you need to understand, fine.
So, what we are saying here is, since P is E, these two together gives me E times A is
R, fine. So, be careful about this, E times A is R and what is E? E is nothing but P and
P is invertible. Why is P invertible? Invertible because P is product of elementary matrices,
fine. So, again let us understand that I have A and identity, I started with that, I am
applying elementary matrices, I have got R, E, fine. So, what I am doing is that I
have multiplied elementary matrices, say E 1, E 2, E k with us. This I am writing it
as P, I wrote it as P, fine. So, P times A of I and A and I n gives me R, E. I look at
the two matrices separately, it gives me P times A is R and P is E. Since P is E, these
two together gives me E times A is R, fine. And P is product of elementary matrices,
so P is invertible, so E is invertible, fine. E is, that is very very important, alright.
Now what can I say about R? Let us try to understand that, fine. So, let me write it
here before going to the next page. So, what we are saying is that E is invertible. Now
if I look at A, so what we had learnt was that, let me go back here, that let F be equal
to this, B is equal to this, the first S columns, alright. B consists of the first S columns
of A. Then the R, R, E, F of B, this new matrix is nothing but the first S columns of R, R,
E, F of A itself, alright. It is just the first S columns here, this is what it is,
fine. So, what we are saying is that, if this is the R, R, E, F of A and I n, then
R is the R, R, E, F of, so this implies by the previous theorem that R is indeed equal
to R, R, E, F of A, fine. So, please go back to the previous one again, let us see. It
says that F is the R, R, E, F of A, so for us in this example what we have is F is equal
to R, R, E, F of this, fine, which is nothing but R and E, this is what we wrote it as,
fine. So, R, R, E, F of A and I n was this and therefore
I am looking at A, the first n columns, the first n columns of this matrix and therefore
it is R, R, E, F, alright. So, the R, R, E, F of A has to be this part, is that okay,
this is what it says, the first S columns, the first n columns of F. So, the first n
columns of F, which is nothing but R, fine. So, this is what is important, you get R equal
to R, R, E, F, therefore if R is identity then E times A is identity, look at this part
from here, E times A is R, R I am saying is identity, so E times A is identity, E is invertible
implies E times A is equal to I is equal to A times E and therefore A is invertible,
fine. So, when I apply R, R, E, F to A and this
and it turns out that the left hand side this R turns out to be identity, fine, if it turns
out to be identity then I know that the right hand side is the inverse of A and if R is
not the identity then I know that A is not invertible, alright. So, let me write that
part, so what we have done is I have A and identity with me, applied the Gauss Jordan
method which gives us, alright, the Gauss Jordan method which gives us the R, R, E,
F, this is supposed to be R and E, if R is identity then A inverse is E, if R is not
equal to I n then A is not invertible, so we are getting both of them at the same time,
is that okay, fine.
So, let me just explain this with a small example how to compute this inverse, so example
so I have the matrix A as 0, 0, 1, 0, 1, 1, 1, 1, 1 this is the matrix I have I want to
see whether this matrix is invertible or not if it is invertible finds inverse, so we write
A and I 3 which is nothing but 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1,
fine. I want this to be the pivot for me, so I have to interchange these two I am not
going to write that part, so let me write one after the other, so I want to make this
as the first row 1, 1, 1, 0, 0, 1, fine 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0 I have this,
so interchange third and first row, alright. Important thing is I am allowed only row operations
no column operations, alright, fine. At the next stage I can use this one to make this
entry 0, fine, so I have 0, 0, 1, 1, 0, 0 use this one to make this entry 0 or use this
to make this one 0, so let me do that, so I can make 1, 0, 0, alright this minus this,
so become 0, 0 here it will become 0, 0 minus 1 is minus 1, 1 will remain as it is I can
make this 0 using this, so I will get this minus this, so I will get here minus 1 is
I hope 0 here, alright, yes, fine.
So what I have done here is R 3, R 1 is being replaced by R 1 minus R 2, so just look at
this, this minus this will give me 0 here, 0, 0, minus 1 and 1 and I have also done after
that once I have done this I am looking at R 2 is being replaced by R 2 minus R 3, this
minus this, so I get minus 1, 1, 0, alright. So for me what I see is that this is I 3,
so this is the inverse, so you can check that 0, 0, 1, 0, 1, 1, 1, 1, 1 this matrix times
0, minus 1, 1, minus 1, 1, 0, 1, 0, 0 is identity, alright.
The way to check is look at this it says that you are looking at 0 times the first
column plus minus 1 times the second column plus 1 times the third column, so here it
says 1 will remain as it is the first part will remain 1, minus 1, minus 1 will give
me 0, 0 here, if you look at this it says minus 1 times 0, 0, 1 plus 1 times 0, 1, 1,
so this gives me 0, this 0, this 1, this gives me 1, minus 1 plus 1 again gives me
0 here and this gives me 0, 0, 1, so it is indeed the inverse, fine.
So I would like you to learn to compute these things, alright and it is very, very important
that I start with A and I n, I apply the Gauss Jordan method if the first part has identity
as an RREF then I get the inverse otherwise A is not invertible, thank you.
