 product of two matrices is independent of the order of the factors: tr(AB) = tr(BA).[15]Also, the trace of a matrix is equal to that of its transpose, i.e., tr(A) = tr(AT).If all entries outside the main diagonal are zero, A is called a diagonal matrix. If only all entries above (below) the main diagonal are zero, A is called a lower triangular matrix (upper triangular matrix, respectively). For example, if n = 3, they look like[d11000d22000d33]{\displaystyle {\begin{bmatrix}d_{11}&0&0\\0&d_{22}&0\\0&0&d_{33}\\\end{bmatrix}}} (diagonal), [l1100l21l220l31l32l33]{\displaystyle {\begin{bmatrix}l_{11}&0&0\\l_{21}&l_{22}&0\\l_{31}&l_{32}&l_{33}\\\end{bmatrix}}} (lower) and [u11u12u130u22u2300u33]{\displaystyle {\begin{bmatrix}u_{11}&u_{12}&u_{13}\\0&u_{22}&u_{23}\\0&0&