# Orthogonal matrix

 By multiplying by an orthogonal matrix Q , vectors can be rotated (left) or mirrored (right). The length of the vectors and the angle between the vectors are retained.

In linear algebra, an orthogonal matrix is a square, real matrix whose row and column vectors are orthonormal with respect to the standard scalar product. Thus the inverse of an orthogonal matrix is ​​also its transpose .

Orthogonal matrices represent congruence mappings in Euclidean space , i.e. rotations , reflections and combinations thereof. Each orthogonal map between two finite-dimensional scalar product spaces can be represented by an orthogonal matrix according to the choice of one orthonormal basis . The set of orthogonal matrices of a fixed size, together with the matrix multiplication as a link, form the orthogonal group .

Orthogonal matrices are used, for example, for the numerical solution of linear systems of equations or eigenvalue problems. The analogous term for complex matrices is the unitary matrix .

## definition

A real square matrix is called orthogonal if the product with its transposed matrix results in the unit matrix , i.e. ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$ ${\ displaystyle Q ^ {T}}$ ${\ displaystyle I}$

${\ displaystyle Q ^ {T} \ cdot Q = I}$

applies. If the column vectors of the matrix are labeled with , then this condition is synonymous with the standard scalar product of two column vectors ${\ displaystyle Q}$${\ displaystyle q_ {1}, \ ldots, q_ {n}}$

${\ displaystyle q_ {i} ^ {T} \ cdot q_ {j} = \ delta _ {ij} = {\ begin {cases} 1 & {\ text {falls}} ~ i = j \\ 0 & {\ text { otherwise}} \ end {cases}}}$

results, where the Kronecker delta is. The column vectors of an orthogonal matrix thus form an orthonormal basis of the coordinate space . This also applies to the row vectors of an orthogonal matrix, because with is also orthogonal, that is ${\ displaystyle \ delta _ {ij}}$ ${\ displaystyle \ mathbb {R} ^ {n}}$${\ displaystyle Q}$${\ displaystyle Q ^ {T}}$

${\ displaystyle Q \ cdot Q ^ {T} = I}$.

Even if the term “orthogonal matrix” could be understood in this way, it is not sufficient if the row or column vectors are only orthogonal in pairs ; they must also be standardized , i.e. have a length of one.

## Examples

### Concrete examples

• The matrix
${\ displaystyle Q = {\ begin {pmatrix} 0 & 1 \\ 1 & 0 \ end {pmatrix}}}$
is orthogonal because it applies
${\ displaystyle Q ^ {T} \, Q = {\ begin {pmatrix} 0 & 1 \\ 1 & 0 \ end {pmatrix}} \ cdot {\ begin {pmatrix} 0 & 1 \\ 1 & 0 \ end {pmatrix}} = {\ begin {pmatrix} 0 \ times 0 + 1 \ times 1 & 0 \ times 1 + 1 \ times 0 \\ 1 \ times 0 + 0 \ times \ times 1 & 1 \ times 1 + 0 \ times 0 \ end {pmatrix}} = {\ begin { pmatrix} 1 & 0 \\ 0 & 1 \ end {pmatrix}} = I}$.
• The matrix too
${\ displaystyle Q = {\ frac {1} {5}} {\ begin {pmatrix} 3 & 4 \\ - 4 & 3 \ end {pmatrix}}}$
is orthogonal because it applies
${\ displaystyle Q ^ {T} \, Q = {\ frac {1} {5}} {\ begin {pmatrix} 3 & -4 \\ 4 & 3 \ end {pmatrix}} \ cdot {\ frac {1} {5 }} {\ begin {pmatrix} 3 & 4 \\ - 4 & 3 \ end {pmatrix}} = {\ frac {1} {25}} {\ begin {pmatrix} 9 + 16 & 12-12 \\ 12-12 & 16 + 9 \ end {pmatrix}} = {\ frac {1} {25}} {\ begin {pmatrix} 25 & 0 \\ 0 & 25 \ end {pmatrix}} = {\ begin {pmatrix} 1 & 0 \\ 0 & 1 \ end {pmatrix}} = I }$.

### General examples

• Permutation matrices , i.e. matrices in which exactly one entry per row and column is equal to one and all other entries are zero, are orthogonal. Denotes the permutation matrix belonging to a permutation, then applies${\ displaystyle P _ {\ pi}}$ ${\ displaystyle \ pi}$
${\ displaystyle P _ {\ pi} ^ {T} \, P _ {\ pi} = P _ {\ pi ^ {- 1}} \, P _ {\ pi} = P _ {\ pi ^ {- 1} \ circ \ pi} = P _ {\ mathrm {id}} = I}$,
because the transposed permutation matrix is ​​equal to the permutation matrix of the inverse permutation , which reverses all swaps, and the product of permutation matrices corresponds to the successive execution of the permutations. The signed permutation matrices , in which exactly one entry is plus or minus one in each row and column and all other entries are zero, are exactly the integer orthogonal matrices.
${\ displaystyle R _ {\ alpha} = {\ begin {pmatrix} \ cos \ alpha & - \ sin \ alpha \\\ sin \ alpha & \ cos \ alpha \ end {pmatrix}}}$
the rotation matrix of a rotation through an angle that fixes the origin, then applies with the " trigonometric Pythagoras "${\ displaystyle \ alpha}$
${\ displaystyle R _ {\ alpha} ^ {T} \, R _ {\ alpha} = {\ begin {pmatrix} \ cos ^ {2} \ alpha + \ sin ^ {2} \ alpha & - \ cos \ alpha \ sin \ alpha + \ sin \ alpha \ cos \ alpha \\ - \ sin \ alpha \ cos \ alpha + \ cos \ alpha \ sin \ alpha & \ sin ^ {2} \ alpha + \ cos ^ {2} \ alpha \ end {pmatrix}} = I}$.
More generally, rotation matrices that describe a rotation in any plane of origin in -dimensional space are also orthogonal.${\ displaystyle n}$
${\ displaystyle S_ {n} = I-2nn ^ {T}}$
the reflection matrix of a reflection on a straight line through the origin with a unit normal vector , then applies${\ displaystyle n}$
${\ displaystyle S_ {n} ^ {T} \, S_ {n} = S_ {n} \, S_ {n} = (I-2nn ^ {T}) \, (I-2nn ^ {T}) = I-4nn ^ {T} + 4n (n ^ {T} n) n ^ {T} = I}$,
because reflection matrices are symmetrical by definition and holds for a unit vector . More generally, matrices that describe reflections on any sub-vector space in -dimensional space (for example a hyperplane ) are also orthogonal.${\ displaystyle n ^ {T} n = 1}$${\ displaystyle n}$

## properties

### Inverse

An orthogonal matrix is always regular due to the linear independence of its row and column vectors . The inverse of an orthogonal matrix is ​​equal to its transpose, that is, it applies ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle Q ^ {T} = Q ^ {- 1}}$.

The inverse of a matrix is precisely the matrix for which ${\ displaystyle Q}$${\ displaystyle Q ^ {- 1}}$

${\ displaystyle Q \, Q ^ {- 1} = Q ^ {- 1} \, Q = I}$

applies. It also follows from the second equation that the transpose of an orthogonal matrix is ​​orthogonal. The inverse is also true, and every matrix whose transpose is equal to its inverse is orthogonal, because then it is true ${\ displaystyle Q}$

${\ displaystyle Q ^ {T} \, Q = Q ^ {- 1} \, Q = I}$.

### Length and angle accuracy

If a vector is multiplied by an orthogonal matrix , the length ( Euclidean norm ) of the vector does not change, that is ${\ displaystyle x \ in \ mathbb {R} ^ {n}}$${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle \ | Q \, x \ | _ {2} = \ | x \ | _ {2}}$.

Furthermore, the standard scalar product of two vectors is invariant with respect to the multiplication with an orthogonal matrix , i.e. ${\ displaystyle x, y \ in \ mathbb {R} ^ {n}}$${\ displaystyle Q}$

${\ displaystyle \ left \ langle Q \, x, Q \, y \ right \ rangle = \ left \ langle x, y \ right \ rangle}$.

This also maintains the angle between the two vectors. Both properties follow directly from the displacement property of the standard scalar product. Because of this length and angle accuracy, the linear mapping

${\ displaystyle f \ colon \ mathbb {R} ^ {n} \ to \ mathbb {R} ^ {n}, x \ mapsto Q \, x}$

represents a congruence mapping in Euclidean space. Conversely, the mapping matrix is orthogonal with respect to the standard base of every conformal linear mapping in Euclidean space. Because of the polarization formula , every image that is true to length is also true to angle.

### Determinant

The following applies to the absolute value of the determinant of an orthogonal matrix${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle | \ det Q | = 1}$,

which with the help of the determinants product set over

${\ displaystyle (\ operatorname {det} Q) ^ {2} = \ det Q \ cdot \ det Q = \ det Q ^ {T} \ cdot \ det Q = \ det (Q ^ {T} Q) = \ det I = 1}$

follows. Thus the determinant of an orthogonal matrix can only take the values ​​one or minus one. However, there are also non-orthogonal matrices whose determinant is plus or minus one, for example unimodular matrices . Orthogonal matrices whose determinant is one correspond to rotations. One then speaks of an actually orthogonal matrix. Orthogonal matrices, the determinant of which is minus one, represent rotational reflections. One then speaks of an improperly orthogonal matrix.

### Eigenvalues

The eigenvalues ​​of an orthogonal matrix are not necessarily all real. However, they have the complex amount one, so they are of the form ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle \ lambda = e ^ {it}}$

with . If there is an eigenvector that belongs to it, then a norm applies due to the length fidelity and the absolute homogeneity${\ displaystyle t \ in \ mathbb {R}}$${\ displaystyle x}$${\ displaystyle \ lambda}$

${\ displaystyle \ | x \ | _ {2} = \ | Q \, x \ | _ {2} = \ | \ lambda \, x \ | _ {2} = | \ lambda | \, \ | x \ | _ {2}}$

and therefore . An orthogonal matrix therefore has at most the real eigenvalues . The complex eigenvalues ​​always appear complex conjugated in pairs , that is, with is also an eigenvalue, because ${\ displaystyle | \ lambda | = 1}$${\ displaystyle \ pm 1}$${\ displaystyle \ lambda = e ^ {it}}$${\ displaystyle {\ bar {\ lambda}} = e ^ {- it}}$

${\ displaystyle Q {\ bar {x}} = {\ overline {Qx}} = {\ overline {\ lambda x}} = {\ bar {\ lambda}} {\ bar {x}}}$.

Accordingly, an orthogonal matrix of odd dimensions has at least one real eigenvalue (see also the football theorem ). ${\ displaystyle n}$

### Diagonalisability

An orthogonal matrix is normal , that is, it holds ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle Q \, Q ^ {T} = Q ^ {T} \, Q}$,

and thus unitarily diagonalizable over the complex numbers . According to the spectral theorem , there is a unitary matrix such that ${\ displaystyle U \ in \ mathbb {C} ^ {n \ times n}}$

${\ displaystyle U ^ {- 1} \, Q \, U = D}$

holds, where is a diagonal matrix with the eigenvalues ​​of . The column vectors of are then pairwise orthonormal eigenvectors of . This means that the eigenspaces of an orthogonal matrix are also orthogonal in pairs. ${\ displaystyle D \ in \ mathbb {C} ^ {n \ times n}}$${\ displaystyle Q}$${\ displaystyle U}$${\ displaystyle Q}$

In general, however, an orthogonal matrix is not really diagonalizable. However, there is an orthogonal matrix , so ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$${\ displaystyle V \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle V ^ {- 1} \, Q \, V = {\ begin {pmatrix} D_ {1} && 0 \\ & \ ddots & \\ 0 && D_ {s} \ end {pmatrix}}}$

results in a block diagonal matrix in which the individual blocks are either rotary matrices of size or of number or consist. This representation is also called the normal form of an orthogonal matrix. ${\ displaystyle 2 \ times 2}$${\ displaystyle +1}$${\ displaystyle -1}$

### Norms

The spectral norm of an orthogonal matrix is ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle \ | Q \ | _ {2} = \ max _ {\ | x \ | _ {2} = 1} \ | Q \, x \ | _ {2} = \ max _ {\ | x \ | _ {2} = 1} \ | x \ | _ {2} = 1}$.

For the Frobenius norm , the Frobenius scalar product applies accordingly

${\ displaystyle \ | Q \ | _ {F} = {\ sqrt {\ langle Q, Q \ rangle _ {F}}} = {\ sqrt {\ langle I, I \ rangle _ {F}}} = { \ sqrt {n}}}$.

The product with an orthogonal matrix receives both the spectral norm and the Frobenius norm of a given matrix , because it holds ${\ displaystyle A \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle \ | Q \, A \ | _ {2} = \ max _ {\ | x \ | _ {2} = 1} \ | Q \, A \, x \ | _ {2} = \ max _ {\ | x \ | _ {2} = 1} \ | A \, x \ | _ {2} = \ | A \ | _ {2}}$

and

${\ displaystyle \ | Q \, A \ | _ {F} = {\ sqrt {\ langle Q \, A, Q \, A \ rangle _ {F}}} = {\ sqrt {\ langle A, A \ rangle _ {F}}} = \ | A \ | _ {F}}$.

This means that the condition of a matrix with regard to these norms is retained after multiplication with an orthogonal matrix.

## Orthogonal matrices as a group

The set of regular matrices of fixed size and the matrix multiplication as a link form a group , the general linear group . The identity matrix serves as a neutral element . The orthogonal matrices form a subgroup of the general linear group, the orthogonal group . The product of two orthogonal matrices is again orthogonal because it holds ${\ displaystyle \ mathrm {GL} (n, \ mathbb {R})}$${\ displaystyle I}$ ${\ displaystyle \ mathrm {O} (n)}$${\ displaystyle P, Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle (P \, Q) ^ {T} \, (P \, Q) = Q ^ {T} \, (P ^ {T} \, P) \, Q = Q ^ {T} \, Q = I}$.

Furthermore, the inverse of an orthogonal matrix is also orthogonal because it holds ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle Q ^ {- T} \, Q ^ {- 1} = Q ^ {- T} \, Q ^ {T} = (Q \, Q ^ {- 1}) ^ {T} = I ^ {T} = I}$.

The orthogonal matrices with determinant one, i.e. the rotation matrices, in turn form a subgroup of the orthogonal group, the rotation group (or special orthogonal group) . This is a Lie group ; H. the group operations are compatible with the differentiation in the group, and elements of can be represented as exponentials of matrices from the associated Lie algebra . The orthogonal matrices with determinant minus one, i.e. the rotational reflections, do not form a subgroup of the orthogonal group, but only a secondary class , because they lack the neutral element. ${\ displaystyle \ mathrm {SO} (n)}$${\ displaystyle \ mathrm {SO} (n)}$

## use

### Systems of linear equations

The solution of linear systems of equations of the form

${\ displaystyle Q \, x = b}$

with an orthogonal matrix and a right hand side is numerically efficient through ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$${\ displaystyle b \ in \ mathbb {R} ^ {n}}$

${\ displaystyle x = Q ^ {T} \, b}$

to calculate. The determination of the solution therefore only requires a matrix-vector multiplication , which can be carried out with an effort of the order . In comparison, the solution of general linear equation systems, for example with the help of Gaussian elimination, requires an effort . This advantage is used, for example, in the (real) discrete Fourier transformation and the discrete cosine transformation . ${\ displaystyle x \ in \ mathbb {R} ^ {n}}$ ${\ displaystyle O (n ^ {2})}$${\ displaystyle O (n ^ {3})}$

### Matrix decompositions

Another application of orthogonal matrices is the QR decomposition of a given matrix as a product ${\ displaystyle A \ in \ mathbb {R} ^ {m \ times n}}$

${\ displaystyle A = Q \, R}$

an orthogonal matrix and an upper triangular matrix . The construction of the matrix can be done with Givens rotations , which correspond to rotations, or household transformations , which correspond to reflections. QR decompositions are used in numerics to solve poorly conditioned, overdetermined or underdetermined linear systems of equations. Another field of application is the calculation of eigenvalue problems with the QR algorithm . ${\ displaystyle Q \ in \ mathbb {R} ^ {m \ times m}}$ ${\ displaystyle R \ in \ mathbb {R} ^ {m \ times n}}$${\ displaystyle Q}$

With the help of singular value decomposition , every real matrix can also be used as a product ${\ displaystyle A \ in \ mathbb {R} ^ {m \ times n}}$

${\ displaystyle A = U \, \ Sigma \, V ^ {T}}$

an orthogonal matrix , a diagonal matrix and the transpose of another orthogonal matrix . The diagonal entries of the matrix are then the singular values ​​of . The singular value decomposition is used, for example, in geometry for the main axis transformation of quadrics and in statistics for the main component analysis of multivariate data sets. ${\ displaystyle U \ in \ mathbb {R} ^ {m \ times m}}$ ${\ displaystyle \ Sigma \ in \ mathbb {R} ^ {m \ times n}}$${\ displaystyle V \ in \ mathbb {R} ^ {n \ times n}}$${\ displaystyle \ Sigma}$${\ displaystyle A}$

A square matrix can also be used as a product by means of the polar decomposition${\ displaystyle A \ in \ mathbb {R} ^ {n \ times n}}$

${\ displaystyle A = Q \, P}$

an orthogonal matrix and a positive semidefinite symmetric matrix . ${\ displaystyle Q \ in \ mathbb {R} ^ {n \ times n}}$${\ displaystyle P \ in \ mathbb {R} ^ {n \ times n}}$

### Orthogonal mappings

If a -dimensional real scalar product space , then every linear mapping can be based on the choice of an orthonormal basis for through the mapping matrix${\ displaystyle (V, \ langle \ cdot, \ cdot \ rangle)}$${\ displaystyle n}$ ${\ displaystyle f \ colon V \ to V}$${\ displaystyle \ {e_ {1}, \ ldots, e_ {n} \}}$${\ displaystyle V}$

${\ displaystyle A_ {f} = (a_ {ij}) \ in \ mathbb {R} ^ {n \ times n}}$

represent, where for is. The mapping matrix is now orthogonal if and only if is an orthogonal mapping . This follows from ${\ displaystyle f (e_ {j}) = a_ {1j} e_ {1} + \ dotsb + a_ {nj} e_ {n}}$${\ displaystyle j = 1, \ dotsc, n}$${\ displaystyle A_ {f}}$${\ displaystyle f}$

${\ displaystyle \ langle f (v), f (w) \ rangle = (A_ {f} x) ^ {T} (A_ {f} y) = x ^ {T} A_ {f} ^ {T} A_ {f} y = x ^ {T} y = \ langle v, w \ rangle}$,

where and are. ${\ displaystyle v = x_ {1} e_ {1} + \ dotsb + x_ {n} e_ {n}}$${\ displaystyle w = y_ {1} e_ {1} + \ dotsb + y_ {n} e_ {n}}$