# Orthogonal transformation

In linear algebra, an orthogonal transformation is a linear transformation T : V → V on a real inner product space V, that preserves the inner product. That is, for each pair u, v of elements of V, we have
    $\langle u,v\rangle =\langle Tu,Tv\rangle \,.$
Since the lengths of vectors and the angles between them are defined through the inner product, orthogonal transformations preserve lengths of vectors and angles between them. In particular, orthogonal transformations map orthonormal bases to orthonormal bases.
Orthogonal transformations are injective: if $Tv=0$ then $0=\langle Tv,Tv\rangle =\langle v,v\rangle$, hence $v=0$, so the kernel of $T$ is trivial.
Orthogonal transformations in two- or three-dimensional Euclidean space are stiff rotations, reflections, or combinations of a rotation and a reflection (also known as improper rotations). Reflections are transformations that reverse the direction front to back, orthogonal to the mirror plane, like (real-world) mirrors do. The matrices corresponding to proper rotations (without reflection) have a determinant of +1. Transformations with reflection are represented by matrices with a determinant of −1. This allows the concept of rotation and reflection to be generalized to higher dimensions.
In finite-dimensional spaces, the matrix representation (with respect to an orthonormal basis) of an orthogonal transformation is an orthogonal matrix. Its rows are mutually orthogonal vectors with unit norm, so that the rows constitute an orthonormal basis of V. The columns of the matrix form another orthonormal basis of V.
If an orthogonal transformation is invertible (which is always the case when V is finite-dimensional) then its inverse $T^{-1}$ is another orthogonal transformation identical to the transpose of $T$: $T^{-1}=T^{\mathtt {T}}$.

## Examples

Consider the inner-product space $(\mathbb {R} ^{2},\langle \cdot ,\cdot \rangle )$ with the standard Euclidean inner product and standard basis. Then, the matrix transformation
    $T={\begin{bmatrix}\cos(\theta )&-\sin(\theta )\\\sin(\theta )&\cos(\theta )\end{bmatrix}}:\mathbb {R} ^{2}\to \mathbb {R} ^{2}$
is orthogonal. To see this, consider
    ${\begin{aligned}Te_{1}={\begin{bmatrix}\cos(\theta )\\\sin(\theta )\end{bmatrix}}&&Te_{2}={\begin{bmatrix}-\sin(\theta )\\\cos(\theta )\end{bmatrix}}\end{aligned}}$
Then,
    ${\begin{aligned}&\langle Te_{1},Te_{1}\rangle ={\begin{bmatrix}\cos(\theta )&\sin(\theta )\end{bmatrix}}\cdot {\begin{bmatrix}\cos(\theta )\\\sin(\theta )\end{bmatrix}}=\cos ^{2}(\theta )+\sin ^{2}(\theta )=1\\&\langle Te_{1},Te_{2}\rangle ={\begin{bmatrix}\cos(\theta )&\sin(\theta )\end{bmatrix}}\cdot {\begin{bmatrix}-\sin(\theta )\\\cos(\theta )\end{bmatrix}}=\sin(\theta )\cos(\theta )-\sin(\theta )\cos(\theta )=0\\&\langle Te_{2},Te_{2}\rangle ={\begin{bmatrix}-\sin(\theta )&\cos(\theta )\end{bmatrix}}\cdot {\begin{bmatrix}-\sin(\theta )\\\cos(\theta )\end{bmatrix}}=\sin ^{2}(\theta )+\cos ^{2}(\theta )=1\\\end{aligned}}$
The previous example can be extended to construct all orthogonal transformations. For example, the following matrices define orthogonal transformations on $(\mathbb {R} ^{3},\langle \cdot ,\cdot \rangle )$:
    ${\begin{bmatrix}\cos(\theta )&-\sin(\theta )&0\\\sin(\theta )&\cos(\theta )&0\\0&0&1\end{bmatrix}},{\begin{bmatrix}\cos(\theta )&0&-\sin(\theta )\\0&1&0\\\sin(\theta )&0&\cos(\theta )\end{bmatrix}},{\begin{bmatrix}1&0&0\\0&\cos(\theta )&-\sin(\theta )\\0&\sin(\theta )&\cos(\theta )\end{bmatrix}}$