Diagonal matrix

From Linear
Revision as of 02:58, 29 April 2014 by Vipul (talk | contribs)

This article defines a property that can be evaluated for a square matrix. In other words, given a square matrix (a matrix with an equal number of rows and columns) the matrix either satisfies or does not satisfy the property.
View other properties of square matrices

Definition

A diagonal matrix is a square matrix for which all the off-diagonal entries are zero, or equivalently, all nonzero entries are on the diagonal. Note that it is also possible that some (or even all) the diagonal entries are zero.

Encoding

A matrix that is known to be diagonal may simply be encoded using an ordered list of its diagonal entries. For a n×n matrix, this requires space for n entries (in contrast with space for n2 entries for an arbitrary square matrix).

Matrix operations

Unless otherwise specified, diagonal matrices are n×n diagonal matrices.

Matrix operation Arithmetic complexity: number of additions Arithmetic complexity: number of multiplications
Computation of the trace n1 0
Computation of the determinant 0 n1
Addition of two such matrices n 0
Multiplication of two such matrices 0 n
Multiplication by a n×p rectangular matrix (we allow n=p) 0 np