CHAPTER 04.04: UNARY MATRIX OPERATIONS: Trace of a Matrix

 

 

In this segment we will talk how to find a trace of a matrix. And how do we define the trace of a matrix? First it will be – the matrix has to be square. SO the trace of a square matrix A – so it has n rows and n columns, is defined as – we’ll call the trace as “tr” – so trA is summation is equal to 1 to n aii. So all you are doing in order to find the trace of a matrix is simple take all the diagonal elements and adding them all up. So that’s what the trace of a square matrix is.

 

Let’s take an example. Let’s suppose somebody says hey A matrix is given as 15, 6, 7, 3, 9, 2, -1, 3, -7. So if that’s the A matrix and somebody says – hey, find out the trace of this matrix. I’ll say trace of A is summation I is equal to 1 to 3 aii. Because we have three the size of this matrix is three by three. So that will become a11 plus a22 plus a33. So it’s basically the summation of all the diagonal elements, but I’m expanding it just to show you how the formula works. Or if you were going to program this, how you should interpret that. So that becomes 15 plus 9 minus 7 is equal to 17. So that’s what the trace of this particular matrix is.  And that’s the end of this segment.