# Find an orthogonal basis for the column space of the matrix given below:

$\boldsymbol{ \left[ \begin{array}{ccc} 3 & -5 & 1 \\ 1 & 1 & 1 \\ -1 & 5 & -2 \\ 3 & -7 & -8 \end{array} \right] }$This question aims to learn the Gram-Schmidt orthogonalization process. The solution given below follows the step-by-step procedure.

In Gram-Schmidt orthogonalization, we assume the first basis vector to be equal to any of the given vectors. Then we find the subsequent orthogonal basis vectors by subtracting the parallel projections of the respective vector on the already calculated basis vectors.

The general formula is given by (for any ith basis):

$v_i \ = \ X \ – \ Proj_{v_1} (X) \ – \ Proj_{v_2} (X) \ ………. \ Proj_{v_{i-1}} (X)$

Where (for any jth projection):

$Proj_{v_j} (X) \ = \ \frac{X \cdot v_j }{ v_j \cdot v_j } \cdot v_j$

Lets call the the column space vectors as follows:

$A \ = \ < \ 3, \ 1, \ -1, \ 3 \ >$

$B \ = \ < \ -5, \ 1, \ 5, \ 7>$

$C \ = \ < \ 1, \ 1, \ -2, \ -8 \ >$

Also, lets call the orthogonal basis vectors as $v_1, \ v_2$ and $v_3$.

Also, assume that:

$Proj_{v_1} (B) = \text{Projection of B vector along basis vector }v_1$

$Proj_{v_1} (C) = \text{Projection of C vector along basis vector }v_1$

$Proj_{v_2} (C) = \text{Projection of C vector along basis vector }v_2$

Step 1: Calculating $v_1$:

$v_1 \ = \ A \ = \ < \ 3, \ 1, \ -1, \ 3 \ >$

Step 2: Calculating $v_2$:

$Proj_{v_1} (B) \ = \ \frac{B \cdot v_1 }{ v_1 \cdot v_1 } \cdot v_1$

$Proj_{v_1} (B) \ = \ \frac{<-5,1,5,7> \cdot <3,1,-1,3> }{ <3,1,-1,3> \cdot <3,1,-1,3> } \cdot <3,1,-1,3>$

$Proj_{v_1} (B) \ = \ \frac{-40}{20} \cdot <3,1,-1,3>$

$Proj_{v_1} (B) \ = \ <-6,-2,2,-6>$

$v_2 \ = \ B \ – \ Proj_{v_1} (B)$

$v_2 \ = \ <-5,1,5,7> \ – \ <-6,-2,2,-6>$

$v_2 \ = \ <1,3,3,-1>$

Step 3: Calculating $v_3$:

$Proj_{v_1} (C) \ = \ \frac{C \cdot v_1 }{ v_1 \cdot v_1 } \cdot v_1$

$Proj_{v_1} (C) \ = \ \frac{<1,1,-2,-8> \cdot <3,1,-1,3> }{ <3,1,-1,3> \cdot <3,1,-1,3> } \cdot <3,1,-1,3>$

$Proj_{v_1} (C) \ = \ \frac{30}{20} \cdot <3,1,-1,3>$

$Proj_{v_1} (C) \ = \ <\frac{9}{2},\frac{3}{2},\frac{-3}{2},\frac{9}{2}>$

$Proj_{v_2} (C) \ = \ \frac{C \cdot v_2 }{ v_2 \cdot v_2 } \cdot v_2$

$Proj_{v_2} (C) \ = \ \frac{<1,1,-2,-8> \cdot <1,3,3,-1> }{ <1,3,3,-1> \cdot <1,3,3,-1> } \cdot <1,3,3,-1>$

$Proj_{v_2} (C) \ = \ \frac{-10}{20} \cdot <1,3,3,-1>$

$Proj_{v_2} (C) \ = \ <\frac{-1}{2},\frac{-3}{2},\frac{-3}{2},\frac{1}{2}>$

$v_3 \ = \ C \ – \ Proj_{v_1} (C) \ – \ Proj_{v_2} (C)$

$v_3 \ = \ <1,1,-2,-8> \ – \ <\frac{9}{2},\frac{3}{2},\frac{-3}{2},\frac{9}{2}> \ – \ <\frac{-1}{2},\frac{-3}{2},\frac{-3}{2},\frac{1}{2}>$

$v_3 = <-3,1,1,3>$

## Numerical Result

Basis vectors = $\left[ \begin{array}{c} 3 \\ 1 \\-1 \\ 3 \end{array} \right], \ \left[ \begin{array}{c} 1 \\ 3 \\ 3 \\ -1 \end{array} \right], \ \left[ \begin{array}{c} -3 \\ 1 \\1 \\ 3 \end{array} \right]$

## Example

Find an orthogonal basis for the column space of the matrix given below:

$\boldsymbol{ \left[ \begin{array}{cc} 1 & 2 \\ 3 & -3 \end{array} \right] }$

Here:

$A = <1,3>$

$B = <2,-3>$

So:

$v_1 \ = \ A \ = \ <1,3>$

And:

$Proj_{v_1} (B) \ = \ \frac{<2,-3> \cdot <1,3> }{ <1,3> \cdot <1,3> } \cdot <1,3>$

$Proj_{v_1} (B) \ = \ \frac{-7}{10} \cdot <1,3>$

$Proj_{v_1} (B) \ = \ <\frac{-7}{10}, \frac{-21}{10}>$

$v_2 \ = \ B \ – \ Proj_{v_1} (B)$

$v_2 \ = \ <2,-3> \ – \ <\frac{-7}{10}, \frac{-21}{10}>$

$v_2 \ = \ <\frac{27}{10}, \frac{-9}{10}>$