Special Matrices

  • Square Matrices

    • Identity and diagonal matrices

    • Triangular matrices

    • Symmetric matrices

    • Orthogonal Matrices

  • Dyads

Some special square matrices

Square matrices are matrices that have the same number of rows as columns. The following are important instances of square matrices.

Identity matrix

The n times n identity matrix (often denoted I_n, or simply I, if context allows), has ones on its diagonal and zeros elsewhere. It is square, diagonal and symmetric. This matrix satisfies A cdot I_n = A for every matrix A with n columns, and I_n cdot B = B for every matrix B with n rows.

Matlab syntax
>> I3 = eye(3); % the 3x3 identity matrix
>> A = eye(3,4); % a 3x4 matrix having the 3x3 identity in its first 3 columns

Diagonal matrices

Diagonal matrices are square matrices A with A_{ij} = 0 when i ne j. A diagonal n times n matrix A can be denoted as A = mbox{bf diag}(a), with a in mathbf{R}^n the vector containing the elements on the diagonal. We can also write

 A = left( begin{array}{ccc} a_1 & &  & ddots &  && a_r end{array} right) ,

where by convention the zeros outside the diagonal are not written.

Matlab syntax
>> A = diag([1 2 3]); % a diagonal matrix with 1,2,3 on the diagonal
>> A = spdiags([1 2 3]',0,3,3); % the same matrix declared as a sparse matrix

Symmetric matrices

Symmetric matrices are square matrices that satisfy A_{ij} = A_{ji} for every pair (i,j). An entire section is devoted to symmetric matrices.

Triangular matrices

A square matrix A in mathbf{R}^{m times n} is upper triangular if A_{ij} = 0 when i < j. Here are a few examples:

 A_1  =  left( begin{array}{cc}1&-10&20&0end{array}right), ;; A_2 = left( begin{array}{ccc}3&8&30&6&-1end{array}right), ;; A_3 = left( begin{array}{ccc}0&8&30&0&-1end{array}right).

A matrix is lower triangular if its transpose is upper triangular. For example:

 A = left( begin{array}{ccc}1&0&08&-9&01&-2&3end{array}right).

Orthogonal matrices

Orthogonal (or, unitary) matrices are square matrices, such that the columns form an orthonormal basis. If U = [u_1,ldots,u_n] is an orthogonal matrix, then

 u_i^Tu_j = left{ begin{array}{ll} 1 & mbox{if } i=j,  0 & mbox{otherwise.} end{array} right.

Thus, U^TU = I_n. Similarly, UU^T = I_n.

Orthogonal matrices correspond to rotations or reflections across a direction: they preserve length and angles. Indeed, for every vector x,

 |Ux|_2^2 = (Ux)^T(Ux) = x^TU^TUx = x^Tx = |x|_2^2.

Thus, the underlying linear map x rightarrow Ux preserves the length (measured in Euclidean norm). This is sometimes referred to as the rotational invariance of the Euclidean norm.

In addition, angles are preserved: if x,y are two vectors with unit norm, then the angle theta between them satisfies cos theta = x^Ty, while the angle theta' between the rotated vectors x' = Ux, y' = Uy satisfies cos theta' = (x')^Ty'. Since

 (Ux)^T(Uy) = x^T U^TU y = x^Ty,

we obtain that the angles are the same. (The converse is true: any square matrix that preserves lengths and angles is orthogonal.)

Geometrically, orthogonal matrices correspond to rotations (around a point) or reflections (around a line passing through the origin).

Examples:

Dyads

Dyads are a special class of matrices, also called rank-one matrices, for reasons seen later.

Definition

A matrix A in mathbf{R}^{m times n} is a dyad if it is of the form A = uv^T for some vectors u in mathbf{R}^m, v in mathbf{R}^n. The dyad acts on an input vector x in mathbf{R}^n as follows:

 Ax = (uv^T) x = (v^Tx) u.

In terms of the associated linear map, for a dyad, the output always points in the same direction u in output space (mathbf{R}^m), no matter what the input x is. The output is thus always a simple scaled version of u. The amount of scaling depends on the vector v, via the linear function x rightarrow v^Tx.

Example: Single-factor models of financial data.

Normalized dyads

We can always normalize the dyad, by assuming that both u,v are of unit (Eculidean) norm, and using a factor to capture their scale. That is, any dyad can be written in normalized form:

 A = uv^T = (|u|_2 cdot |v|_2 ) cdot (frac{u}{|u|_2}) ( frac{v}{|v|_2}) ^T = sigma tilde{u}tilde{v}^T ,

where sigma >0, and |tilde{u}|_2 = |tilde{v}|_2 = 1.