Diagonal matrix: Difference between revisions

From Linear
Line 34: Line 34:


A matrix that is ''known'' to be diagonal may simply be encoded using an ordered list of its diagonal entries. For a <math>n \times n</math> matrix, this requires space for <math>n</math> entries (in contrast with space for <math>n^2</math> entries for an arbitrary square matrix).
A matrix that is ''known'' to be diagonal may simply be encoded using an ordered list of its diagonal entries. For a <math>n \times n</math> matrix, this requires space for <math>n</math> entries (in contrast with space for <math>n^2</math> entries for an arbitrary square matrix).
Explicitly, the ordered list <math>(a_{11},a_{22},\dots,a_{nn})</math> can be used to describe the diagonal matrix <math>A = (a_{ij})</math>. Further:
* This encoding rule takes <math>n</math> times the space needed to store a single entry.
* It is easy to convert back and forth between this encoding rule and the matrix description. In one direction, given this encoding rule, and numbers <math>i,j \in \{ 1,2,\dots,n\}</math>, we can easily determine <math>a_{ij}</math>. In the reverse direction, given a matrix encoded in the usual manner, we can look up the diagonal entries and construct the encoding. (To confirm that the matrix is diagonal, we need to look at ''all'' matrix entries).


==Matrix operations==
==Matrix operations==

Revision as of 19:39, 29 April 2014

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

Verbal 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.

Algebraic description

Suppose is a positive integer. Suppose is a matrix. We say that is a diagonal matrix if the following holds:

In general, a diagonal matrix has the following appearance:

Note that for an actual diagonal matrix, the symbols will be replaced by values in the underlying set or ring the matrix is over.

Small cases

General description of diagonal matrix Number of free parameters (equals )
1 1
2 2
3 3

Encoding

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

Explicitly, the ordered list can be used to describe the diagonal matrix . Further:

  • This encoding rule takes times the space needed to store a single entry.
  • It is easy to convert back and forth between this encoding rule and the matrix description. In one direction, given this encoding rule, and numbers , we can easily determine . In the reverse direction, given a matrix encoded in the usual manner, we can look up the diagonal entries and construct the encoding. (To confirm that the matrix is diagonal, we need to look at all matrix entries).

Matrix operations

Unless otherwise specified, diagonal matrices are diagonal matrices.

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