Orthonormal basis of the column space of a matrix

linear algebraorthogonality

Find an orthonormal basis of the column space of the matrix $$\begin{pmatrix}1 & -1 & 2 & 3\\
-1 & 1 & -3 & 2\\
2 & -2 & 5 & -5 \end{pmatrix}.$$

I found the row reduced echelon form of the matrix given as $$\begin{pmatrix} 1 & -1 & 0 & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1 \end{pmatrix}.$$
So column space of the matrix is the span of $A$, where $A=\left\{\begin{pmatrix}1\\0\\0\end{pmatrix}, \begin{pmatrix}0\\1\\0\end{pmatrix},\begin{pmatrix}0\\0\\1\end{pmatrix}\right\}$.

How to proceed after this step?

Best Answer

Beware that, in general, the pivot columns of the RREF are not a basis of the column space of the initial matrix.

A simple example is the matrix $$ \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}\to\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} $$ (on the left the given matrix, on the right its RREF).

What you can say in general is that the columns of the initial matrix corresponding to the pivot columns in the RREF form a basis of the column space. In the particular case, it's irrelevant, but just because the matrix has rank $3$, so its column space is the whole $\mathbb{R}^3$ and any orthonormal basis of $\mathbb{R}^3$ will do. However, if you change the matrix into \begin{pmatrix} 1 & -1 & 2 & 3\\ -1 & 1 & -3 & -4\\ 2 & -2 & 5 & 7 \end{pmatrix} then the RREF is \begin{pmatrix} 1 & -1 & 0 & 1\\ 0 & 0 & 1 & 1\\ 0 & 0 & 0 & 0 \end{pmatrix} so you get a basis of the column space as $$ \mathcal{B}=\left\{ \begin{pmatrix}1\\-1\\2\end{pmatrix},\begin{pmatrix}2\\-3\\5\end{pmatrix} \right\} $$ You can obtain an orthonormal basis by applying, for instance, Gram-Schmidt to these two vectors.