\documentclass[a4paper,12pt]{article}

\newcommand{\ds}{\displaystyle}
\begin{document}

\parindent=0pt


QUESTION

The following vectors form a basis for a three-dimensional
subspace of $\textbf{R}^4$:

(1,2,1,2), (0,3,4,5), (1,9,9,7).

Use the Gram-Schmidt process to find an orthonormal basis for the
subspace.

\bigskip

ANSWER

Call the given vectors $\textbf{u}_1,\textbf{u}_2,\textbf{u}_3$
and the desired vectors $\textbf{w}_1,\textbf{w}_2,\textbf{w}_3$,
then

\begin{eqnarray*}
\textbf{w}_1&=&\textbf{u}_1,\\
\textbf{w}_2&=&\textbf{u}_2-\frac{(\textbf{u}_2.\textbf{w}_1)\textbf{w}_1}{|\textbf{w}_1|^2},\\
\textbf{w}_3&=&\textbf{u}_3-\frac{(\textbf{u}_3\textbf{w}_2)\textbf{w}_2}{|\textbf{w}_2|^2}-
\frac{(\textbf{u}_3.\textbf{w}_1)\textbf{w}_1}{|\textbf{w}_1|^2},\\
\end{eqnarray*}

Here

\begin{eqnarray*}
\textbf{w}_1&=&(1,2,1,2),\\
\textbf{w}_2&=&(0,3,4,5)-\frac{\{(0,3,4,5).(1,2,1,2)\}(1,2,1,2)}{10}\\
&=&(0,3,4,5)-2(1,2,1,2)\\ &=&(-2,-1,2,1),\\
\textbf{w}_3&=&(1,9,9,7)-\frac{\{(1,9,9,7).(-2,-1,2,1)\}(-2,-1,2,1)}{10}\\&-&\frac{\{(1,9,9,7).(1,2,1,2)\}(1,2,1,2)}{10}\\
&=&(1,9,9,7)-\frac{14}{10}(-2,-1,2,1)-\frac{42}{10}(1,2,1,2)\\
&=&\frac{1}{5}(-2,10,10,-14).
\end{eqnarray*}

Orthogonal basis: (1,2,1,2), (-2,-1,2,1), (-1,5,5,-7).

Orthonormal basis: $\ds\frac{(1,2,1,2)}{\sqrt{10}},\
\frac{(-2,-1,2,1)}{\sqrt{10}},\ \sqrt{(-1,5,5,-7)}{10}$




\end{document}
