An \m×\n A matrix is a line matrix if \m=1, or column matrix if \n=1. A is a square matrix if \m=\n.

IN a matrix A=(\a\i\j), the coefficients \a11, \a22, \a33 ... are diagonal coefficients. The matrix A is a diagonal matrix if all its non-diagonal coefficients are zero.

The matrix A=(\a\i\j) is upper-triangular (resp. lower-triangular) if all its coefficients below (resp. above) the diagonal are zero, that is, \a\i\j = 0 if \i > \j (resp. if \i < \j).

The trace of a matrix A=(\a\i\j) of dimension \m×\n is the sum of diagonal coefficients:

trace(A) = \(\sum_{i=1}^{\min(m,n)}a_{ii})
Remark. Although the definitions of diagonal, trangular and trace are valid for matrices of arbitrary dimensions, in general they are interesting only for square matrices.