CHAPTER 04.01 - 04.05: PRIMER ON SIMULTANEOUS LINEAR EQUATIONS: Diagonal and Identity Matrices

 

In this segment, we'll talk about some special matrices called diagonal and identity matrices.  And again, these are important matrices to understand since you want to learn the numerical methods of solving simultaneous linear equations.  So let's go ahead and look at these special matrices, what is a diagonal matrix and what's an identity matrix?  Now, if you look at the diagonal matrix, in the diagonal matrix, all your off-diagonal elements are 0. So an n-by-n matrix A is a diagonal matrix if all off-diagonal, so that means that all the elements which are not on the . . . not on the diagonal, if all the off-diagonal elements . . . elements are 0. What does that mean?  That basically means that aij, that the values of the aij is equal to 0, if i is not equal to j.  So, because all the off-diagonal elements will have the row number and column number to be different from each other, and the value of the elements of a has to be 0 for those.  It doesn't matter . . . what makes a diagonal matrix is not what is on the diagonal.  What makes a square matrix diagonal is what is not on the diagonal, and you want all the off-diagonal elements to be 0. 

 

An example of that is, let's suppose we take a 4-by-4 matrix here, so we have a 2, 3, 5, -7, on the diagonal, and everything else has to be 0, everything else has to be 0, so you're looking at all the off-diagonal elements are 0. So any of the elements which you are looking for, so you have this, elements below the diagonal are 0, elements above the diagonal are 0. And it doesn't matter what's on the diagonal, I could have a 0, one of, or all of these to be 0, and it will still be a diagonal matrix, so if instead of 3, I have a 0, it's still a diagonal matrix, because what makes a particular matrix to be diagonal is what's not on the . . . what's on the off-diagonal elements, all the off-diagonal elements have to be 0.  So if you look at any of these elements which are off the diagonal, the row number is not the same as the column number.  So, for example, this one here is third row, first column, this one is third row, second column, this one is third row, third column, so I don't even look at it, I only look at the elements where the row number is not the same as the column number, which is the same as saying that I'm looking at the elements which are not on the diagonal, and they all have to be 0, and only then can I call that matrix to be diagonal.  Now, let's go ahead and look at an identity matrix, which is a very important matrix to be . . . to understand so far as solving equations are concerned and finding inverses of matrices, so we'll do that later. So what's an identity matrix?  An n-by-n matrix is an identity matrix, an identity matrix is actually a special case of a diagonal matrix, so if you have an identity matrix, an n-by-n matrix, an identity matrix if all the off-diagonal elements, since it's a special case of a diagonal matrix, all the off-diagonal elements are 0, but there's a restriction on the diagonal elements, and all diagonal elements are 1.  So you cannot have anything on the diagonal elements other than 1, no 0s, no -1s -2s, or anything like that, all the diagonal elements have to be 1, the number 1, that's what we call as identity matrix.  So a typical example of identity matrix, let's suppose we take a 4-by-4 matrix, will be that all the diagonal elements have to be 1.  All the off-diagonal elements have to be 0, all the off-diagonal elements have to be 0. So you're seeing that all the off-diagonal elements which are, these are below the diagonal, these are above the diagonal, they're all 0, and whatever you have on the diagonal is a number 1, nothing else, and that's called an identity matrix. And that's the end of this segment.