Math 511: Linear Algebra
5.3b Gram-Schmidt Orthogonalization
5.3b.1 Orthonormal Bases¶
$$ \require{color} \definecolor{brightblue}{rgb}{.267, .298, .812} \definecolor{darkblue}{rgb}{0.0, 0.0, 1.0} \definecolor{palepink}{rgb}{1, .73, .8} \definecolor{softmagenta}{rgb}{.99,.34,.86} \definecolor{blueviolet}{rgb}{.537,.192,.937} \definecolor{jonquil}{rgb}{.949,.792,.098} \definecolor{shockingpink}{rgb}{1, 0, .741} \definecolor{royalblue}{rgb}{0, .341, .914} \definecolor{alien}{rgb}{.529,.914,.067} \definecolor{crimson}{rgb}{1, .094, .271} \def\ihat{\mathbf{\hat{\unicode{x0131}}}} \def\jhat{\mathbf{\hat{\unicode{x0237}}}} \def\khat{\mathrm{\hat{k}}} \def\tombstone{\unicode{x220E}} \def\contradiction{\unicode{x2A33}} $$
We have seen that the best choice of a basis for an inner product space is an orthonormal basis; that is a basis for which all of the basis vectors are unit vectors and mutually orthogonal to each other. If vector $\mathbf{v}$ is a vector in inner product space $V$, with orthonormal basis $\{\mathbf{u}_1,\ \mathbf{u}_2,\ \cdots,\ \mathbf{u}_n\}$, then $\mathbf{v}$ is in the span$\{\mathbf{u}_1,\ \mathbf{u}_2,\ \cdots,\ \mathbf{u}_n\}$,
$$ \mathbf{v} = c_1\mathbf{u}_1 + c_2\mathbf{u}_2 + \cdots + c_n\mathbf{u}_n = \displaystyle\sum_{j=1}^n c_j\mathbf{u}_k = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_n \end{bmatrix}_U $$
Furthermore each of the coefficients are uniquely determined by the inner product
$$ c_j = \langle\mathbf{v}, \mathbf{u}_j\rangle $$
for $1\le j\le n$. Any other vector $\mathbf{w}\in V$ can also be uniquely determined as well
$$ \mathbf{w} = \displaystyle\sum_{j=1}^n d_j\mathbf{u}_j = \displaystyle\sum_{j=1}^n\langle\mathbf{w},\mathbf{u}_j\rangle\,\mathbf{u}_j = \begin{bmatrix} d_1 \\ d_2 \\ \vdots\\ d_n \end{bmatrix}_U $$
Finally the inner product of any two vectors in an inner product space $V$ is invariant for any choice of an orthonormal basis. Consider the Euclidean inner product on $\mathbb{R}^n$.
$$ \langle\mathbf{v}, \mathbf{w}\rangle = \displaystyle\sum_{j=1}^n c_id_i = \begin{bmatrix} c_1 & c_2 & \cdots & c_n \end{bmatrix}_U\cdot\begin{bmatrix} d_1 \\ d_2 \\ \vdots \\ d_n \end{bmatrix}_U = [\mathbf{v}]_U^T[\mathbf{u}]_U $$
If any other orthonormal basis is chosen
$$ V = \text{span}\{\mathbf{x}_1,\ \mathbf{x}_2,\ \dots,\ \mathbf{x}_n\}, $$
then the value of the inner product using the new orthonormal basis will have the same value
$$ \langle\mathbf{v}, \mathbf{u}\rangle = [\mathbf{v}]_U^T[\mathbf{u}]_U = \displaystyle\sum_{j=1}^n \langle\mathbf{v}, \mathbf{u}_j\rangle\,\langle\mathbf{w},\mathbf{u}_j\rangle = \displaystyle\sum_{j=1}^n\langle\mathbf{v}, \mathbf{x}_j\rangle\,\langle\mathbf{u}, \mathbf{x}_j\rangle = [\mathbf{v}]_X^T[\mathbf{u}]_X $$
This means that the inner product of two vectors in an inner product space, with an orthonormal basis will yield the same value regardless of the orthonormal basis chosen. Choosing an orthonormal basis amounts to choosing the precise list of numbers or coordinates that will be used to describe each vector. Although the list of numbers will be different for different choices of an orthonormal basis, the inner product of the vectors using the list of numbers will always be the same.
5.3b.2 Gram-Schmidt Orthogonalization¶
In most applications a basis is no longer good enough for efficient and accurate results. One needs an orthonormal basis. Given a set of basis vectors one would like to produce and orthonormal basis with the same span. The Gram-Schmidt Orthogonalization Process produces such an orthonormal basis of vectors.
Given any ordinary set of basis vectors for a vector space $\{[\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_n\}$, The Gram-Schmidt Orthogonalization Process produces an orthonormal basis $\{\mathbf{u}_1, \mathbf{u}_2, \dots, \mathbf{u}_n\}$ with the same span
$$ \text{span}\{\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_n\} = \text{span}\{\mathbf{u}_1, \mathbf{u}_2, \dots, \mathbf{u}_n\} $$
Example 1¶
Find an orthonormal basis for the inner product space $\mathbb{R}^3$, derived from the basis
$$ \{\{\mathbf{x}_1, \mathbf{x}_2, \mathbf{x}_3\} = \left\{\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix},\begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix}\right\} $$
- From the first basis vector $\mathbf{x}_1$ we obtain our first unit vector of our orthonormal basis by dividing $\mathbf{x}_1$ by its length to normalize the vector.
$$ \mathbf{u}_1 = \dfrac{\mathbf{x}_1}{\|\mathbf{x}_1\|} $$
In this example,
$$ \mathbf{u}_1 = \dfrac{1}{\sqrt{1^2 + 2^2 + 0^2}}\,\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix} = \begin{bmatrix} \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \\ 0 \end{bmatrix} $$
- To obtain the second orthonormal vector we compute the projection vector $\mathbf{p}_2$ of $\mathbf{x}_2$ onto $\mathbf{u}_1$. Then we subtract this projection from $\mathbf{x}_2$. The difference $\mathbf{x}_2-\mathbf{p}_2$ is the part of vector $\mathbf{x}_2$ that is orthogonal to $\mathbf{u}_1$.
$$ \mathbf{x}_2 - \mathbf{p}_2 = \mathbf{x}_2 - \text{Proj}_{\mathbf{u}_1}\mathbf{x}_2 = \mathbf{x}_2 - \dfrac{\langle\mathbf{x}_2, \mathbf{u}_1\rangle}{\langle\mathbf{u}_1, \mathbf{u}_1\rangle}\mathbf{u}_1 $$
$$ \mathbf{x}_2 - \mathbf{p}_2 = \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} - \dfrac{\frac{1}{\sqrt{5}}(1) + \frac{2}{\sqrt{5}}(0) + 0(1)}{1}\,\begin{bmatrix} \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \\ 0 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} - \begin{bmatrix} \frac{1}{5} \\ \frac{2}{5} \\ 0 \end{bmatrix} = \begin{bmatrix} \frac{4}{5} \\ -\frac{2}{5} \\ 1 \end{bmatrix} $$
- The resulting vector that is orthogonal to our first orthonormal vector, however, it is not necessarily a unit vector. We need to normalize $\mathbf{x}_2 - \mathbf{p}_2$ to obtain $\mathbf{u}_2$.
$$ \mathbf{u}_2 = \dfrac{\mathbf{x}_2 - \mathbf{p}_2}{\|\mathbf{x}_2 - \mathbf{p}_2\|} = \dfrac{}{}\begin{bmatrix} \frac{4}{5} \\ -\frac{2}{5} \\ 1 \end{bmatrix} = \dfrac{1}{\sqrt{\frac{16}{25} + \frac{4}{25} + 1}}\begin{bmatrix} \frac{4}{5} \\ -\frac{2}{5} \\ 1 \end{bmatrix} = \dfrac{1}{\sqrt{\frac{45}{25}}}\begin{bmatrix} \frac{4}{5} \\ -\frac{2}{5} \\ 1 \end{bmatrix} = \dfrac{5}{3\sqrt{5}}\begin{bmatrix} \frac{4}{5} \\ -\frac{2}{5} \\ 1 \end{bmatrix} = \begin{bmatrix} \frac{4}{3\sqrt{5}} \\ -\frac{2}{3\sqrt{5}} \\ \frac{5}{3\sqrt{5}} \end{bmatrix} $$
- Repeat steps 2. and 3. for all remaining vectors.
Subtract projections
$$ \begin{align*} \mathbf{x}_3 - \mathbf{p}_3 &= \mathbf{x}_3 - \text{Proj}_{\mathbf{u}_1}\mathbf{x}_3 - \text{Proj}_{\mathbf{u}_2}\mathbf{x}_3 \\ \\ &= \begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} - \dfrac{\frac{1}{\sqrt{5}}(2) + \frac{2}{\sqrt{5}}(0) + 0(1)}{1}\begin{bmatrix} \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \\ 0 \end{bmatrix} - \dfrac{\frac{4}{3\sqrt{5}}(2) -\frac{2}{3\sqrt{5}}(0) + \frac{5}{3\sqrt{5}}(1) }{1}\begin{bmatrix} \frac{4}{3\sqrt{5}} \\ -\frac{2}{3\sqrt{5}} \\ \frac{5}{3\sqrt{5}} \end{bmatrix} \\ \\ &= \begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} - \dfrac{2}{\sqrt{5}}\begin{bmatrix} \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \\ 0 \end{bmatrix} - \dfrac{13}{3\sqrt{5}}\begin{bmatrix} \frac{4}{3\sqrt{5}} \\ -\frac{2}{3\sqrt{5}} \\ \frac{5}{3\sqrt{5}} \end{bmatrix} \\ \\ &= \begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} - \begin{bmatrix} \frac{2}{5} \\ \frac{4}{5} \\ 0 \end{bmatrix} - \begin{bmatrix} \frac{52}{45} \\ -\frac{26}{45} \\ \frac{65}{45} \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} - \begin{bmatrix} \frac{70}{45} \\ \frac{10}{45} \\ \frac{65}{45} \end{bmatrix} = \begin{bmatrix} \frac{20}{45} \\ -\frac{10}{45} \\ -\frac{20}{45} \end{bmatrix} = \begin{bmatrix} \frac{4}{9} \\ -\frac{2}{9} \\ -\frac{4}{9} \end{bmatrix} \\ \end{align*} $$
Normalize
$$ \mathbf{u}_3 = \dfrac{\mathbf{x}_3 - \mathbf{p}_3}{\|\mathbf{x}_3 - \mathbf{p}_3\|} = \dfrac{1}{\sqrt{\frac{16}{81} + \frac{4}{81} + \frac{16}{81}}}\begin{bmatrix} \frac{4}{9} \\ -\frac{2}{9} \\ -\frac{4}{9} \end{bmatrix} = \dfrac{3}{2}\begin{bmatrix} \frac{4}{9} \\ -\frac{2}{9} \\ -\frac{4}{9} \end{bmatrix} = \begin{bmatrix} \frac{2}{3} \\ -\frac{1}{3} \\ -\frac{2}{3} \end{bmatrix} $$
This results in a new orthonormal basis basis
$$ \{\mathbf{u}_1, \mathbf{u}_2, \mathbf{u}_3\} = \left\{ \begin{bmatrix} \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \\ 0 \end{bmatrix}, \begin{bmatrix} \frac{4}{3\sqrt{5}} \\ -\frac{2}{3\sqrt{5}} \\ \frac{5}{3\sqrt{5}} \end{bmatrix}, \begin{bmatrix} \frac{2}{3} \\ -\frac{1}{3} \\ -\frac{2}{3} \end{bmatrix}\right\} $$
The pattern for the process¶
Normalize the first vector $\mathbf{x}_1$ to obtain the first orthonormal vector $\mathbf{u}_1$.
Subtract the projections of vector $\mathbf{x}_k$ onto every preceding orthonormal vector $\mathbf{u}_1$, $\mathbf{u}_2$, $\dots$, $\mathbf{u}_{k-1}$ from vector $\mathbf{x}_k$ to obtain the orthogonal vector $\mathbf{x}_k-\mathbf{p}_k$.
Normalize vector $\mathbf{x}_k-\mathbf{p}_k$ to obtain orthonormal vector $\mathbf{u}_k$.
Repeat steps 2. and 3. until you run out of vectors.
5.3b.3 The Gram-Schmidt Orthogonalization Process¶
Theorem 5.3b.1¶
The Gram-Schmidt Orthogonalization Process
Let $\{\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_n\}$ be a basis for the inner product space $V$. Define
$$ \mathbf{u}_1 := \dfrac{\mathbf{x}_1}{\|\mathbf{x}_1\|} $$
and define $\mathbf{u}_2$, $\dots$, $\mathbf{u}_n$ recursively by
$$ \mathbf{u}_{k} = \dfrac{\mathbf{x}_{k} - \mathbf{p}_k}{\|\mathbf{x}_{k} - \mathbf{p}_k\|}, $$
where
$$ \begin{align*} \mathbf{p}_k &:= \langle\mathbf{x}_{k}, \mathbf{u}_1\rangle\mathbf{u}_1 + \langle\mathbf{x}_{k}, \mathbf{u}_2\rangle\mathbf{u}_2 + \dots + \langle\mathbf{x}_{k}, \mathbf{u}_{k-1}\rangle\mathbf{u}_{k-1} \\ \\ &= \text{Proj}_{\text{Span}\left\{ u_1, u_2, \dots, u_{k-1}\right\}} x_k \end{align*} $$
is the projection of $\mathbf{x}_{k}$ onto $\text{Span}\{ \mathbf{u}_1, \cdots, \mathbf{u}_{k-1} \}$. Then the set
$$ \{ \mathbf{u}_1, \mathbf{u}_2, \dots, \mathbf{u}_n \} $$
is an orthonormal basis for $V$.
5.3b.4 QR Factorization¶
Consider the matrix
$$ A = \begin{bmatrix}\ 1\ &\ \ 0\ & -3\ \\ \ 1\ & -4\ &\ \ 5\ \\ \ 1\ &\ \ 0\ &\ \ 2\ \\ \ 1\ & -4\ &\ \ 0\ \end{bmatrix} $$
Verify for yourself that the columns of matrix $A$ are linearly independent. Thus the rank$(A) = 3$ and the columns of $A$ form a basis for a three dimensional subspace of $\mathbb{R}^4$. We can use the Gram-Schmidt orthogonalization process to obtain an orthonormal basis for the column space of matrix $A$,
$$ C(A) = \text{span}\{\mathbf{a}_1,\ \mathbf{a}_2,\ \mathbf{a}_3\} = \text{span}\{\mathbf{q}_1,\ \mathbf{q}_2,\ \mathbf{q}_3\} $$
The orthonormal column vectors $\{\mathbf{q}_1, \mathbf{q}_2, \mathbf{q}_3\}$ form a new matrix
$$ Q = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix} $$
1. Normalize the first column vector¶
$$ \begin{align*} \mathbf{q}_1 &= \dfrac{\mathbf{a}_1}{\|\mathbf{a}_1\|} = \dfrac{1}{\|\mathbf{a}_1\|}\mathbf{a}_1 = \dfrac{1}{r_{11}}\mathbf{a}_1 \\ \\ \mathbf{a}_1 &= \|\mathbf{a}_1\|\mathbf{q}_1 := r_{11}\mathbf{q}_1 + 0\mathbf{q}_2 + 0\mathbf{q}_3 = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix}\begin{bmatrix} r_{11} \\ 0 \\ 0 \end{bmatrix} \end{align*} $$
Performing the computations yields
$$ \begin{align*} r_{11} &= \|\mathbf{a}_1\| = \sqrt{1^2 + 1^2 + 1^2 + 1^2} = \sqrt{4} = 2 \\ \\ \mathbf{q}_1 &= \frac{1}{r_{11}}\mathbf{a}_1 = \frac{1}{2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 1/2 \\ 1/2 \\ 1/2 \\ 1/2 \end{bmatrix} \\ \end{align*} $$
If we set $r_{11} = \|\mathbf{a}_1\|$, then as $\mathbf{q}_1 = \frac{\mathbf{a}_1}{r_{11}}$, the multiplying both sides by $r_{11}$ results in writing $\mathbf{a}_1$ as a linear combination of the orthonormal basis vectors
$$ \mathbf{a}_1 = r_{11}\mathbf{q}_1 + 0\mathbf{q}_2 + 0\mathbf{q}_3, $$
which we immediately recognize as matrix-vector multiplication.
$$ \mathbf{a}_1 = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix}\begin{bmatrix} r_{11} \\ 0 \\ 0 \end{bmatrix} $$
This is important linear algebra for the next steps.
$$ \begin{align*} \mathbf{a}_1 &= r_{11}\mathbf{q}_1 = 2\begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} + 0\mathbf{q}_2 + 0\mathbf{q}_2 \\ \\ &= 2\mathbf{q}_1 + 0\mathbf{q}_2 + 1\mathbf{q}_2 = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix} \begin{bmatrix} 2 \\ 0 \\ 0 \end{bmatrix} = Q\mathbf{r}_1 \end{align*} $$
2. Subtract the projection $\mathbf{p}_k$ of $\mathbf{a}_k$ onto our recently obtained orthonormal vectors¶
$$ \begin{align*} \mathbf{a}_2-\mathbf{p}_2 &= \mathbf{a}_2 - \text{Proj}_{\mathbf{q}_1}\mathbf{a}_2 = \mathbf{a}_2 - \dfrac{\langle\mathbf{a}_2, \mathbf{q}_1\rangle}{\langle\mathbf{q}_1, \mathbf{q}_1\rangle}\mathbf{q}_1 = \mathbf{a}_2 - r_{12}\mathbf{q}_1 \\ \end{align*} $$
Performing the computations
$$ \begin{align*} r_{12} &= \dfrac{0(\frac{1}{2}) - 4(\frac{1}{2}) + 0(\frac{1}{2}) - 4(\frac{1}{2}) }{1} = -4 \\ \\ \mathbf{a}_2 - \mathbf{p}_2 &= \begin{bmatrix}\ \ 0\ \\ -4\ \\ \ \ 0\ \\ -4\ \end{bmatrix} - (-4)\begin{bmatrix} 1/2 \\ 1/2 \\ 1/2 \\ 1/2 \end{bmatrix} = \begin{bmatrix}\ \ 0\ \\ -4\ \\ \ \ 0\ \\ -4\ \end{bmatrix} + \begin{bmatrix} 2 \\ 2 \\ 2 \\ 2 \end{bmatrix} = \begin{bmatrix}\ \ 2\ \\ -2\ \\ \ \ 2\ \\ -2\ \end{bmatrix} \end{align*} $$
- Normalize the result
$$ \begin{align*} r_{22} &= \|\mathbf{a}_2 - \mathbf{p}_2\| \\ \\ \mathbf{q}_2 &= \dfrac{\mathbf{a}_2 - \mathbf{p}_2}{\|\mathbf{a}_2 - \mathbf{p}_2\|} = \dfrac{1}{r_{22}}(\mathbf{a}_2 - \mathbf{p}_2) \end{align*} $$
The computations give us
$$ \begin{align*} r_{22} &= \sqrt{ 2^2 + (-2)^2 + 2^2 + (-2)^2 } = \sqrt{16} = 4 \\ \\ \mathbf{q}_2 &= \dfrac{1}{4}\begin{bmatrix}\ \ 2\ \\ -2\ \\ \ \ 2\ \\ -2\ \end{bmatrix} = \begin{bmatrix}\ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \end{bmatrix} \end{align*} $$
Solving for $\mathbf{a}_2$
$$ \begin{align*} r_{22}\mathbf{q}_2 &= \mathbf{a}_2 - \mathbf{p}_2 \\ \\ \mathbf{a}_2 &= \mathbf{p}_2 + r_{22}\mathbf{q}_2 = r_{12}\mathbf{q}_1 + r_{22}\mathbf{q}_2 + 0\mathbf{q}_3 \\ \\ \end{align*} $$
We immediately recognize this a matrix-vector multiplication
$$ \mathbf{a}_2 = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix}\begin{bmatrix} r_{12} \\ r_{22} \\ 0 \end{bmatrix} = Q\mathbf{r}_2 $$
Computationally
$$ \begin{align*} \mathbf{a}_2 &= -4\begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} + 4\begin{bmatrix}\ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \end{bmatrix} + 0\mathbf{q}_3 \\ \\ &= -4\mathbf{q}_1 + 4\mathbf{q}_2 + 0\mathbf{q}_3 = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix}\begin{bmatrix} -4\ \\ \ \ 4\ \\ \ \ 0\ \end{bmatrix} \end{align*} $$
4. Repeat steps 2. and 3. for the remaining vectors.¶
Subtract the projection vectors $\mathbf{p}_3$ of vector $\mathbf{a}_3$ onto $\{\mathbf{q}_1, \mathbf{q}_2\}$ from vector $\mathbf{a}_3$.
$$ \mathbf{a}_3 - \mathbf{p}_3 = \mathbf{a}_3 - \text{Proj}_{\mathbf{q}_1}\mathbf{a}_3 - \text{Proj}_{\mathbf{q}_2}\mathbf{a}_3 = \mathbf{a}_3 - \dfrac{\langle\mathbf{a}_3, \mathbf{q}_1\rangle}{\langle\mathbf{q}_1, \mathbf{q}_1\rangle}\mathbf{q}_1 - \dfrac{\langle\mathbf{a}_3, \mathbf{q}_2\rangle}{\langle\mathbf{q}_2, \mathbf{q}_2\rangle}\mathbf{q}_2 = \mathbf{a}_3 - r_{13}\mathbf{q}_1 - r_{23}\mathbf{q}_2 $$
Performing the computation yields
$$ \begin{align*} r_{13} &= \dfrac{-3(\frac{1}{2}) + 5(\frac{1}{2}) + 2(\frac{1}{2}) + 0(\frac{1}{2}) }{1} = 2 \\ \\ r_{23} &= \dfrac{-3(\frac{1}{2}) + 5(-\frac{1}{2}) + 2(\frac{1}{2}) + 0(-\frac{1}{2}) }{1} = -3 \\ \\ \mathbf{a}_3 - \mathbf{p}_2 &= \begin{bmatrix} -3\ \\ \ \ 5\ \\ \ \ 2\ \\ \ \ 0\ \end{bmatrix} - 2\begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} + 3\begin{bmatrix}\ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \end{bmatrix} \\ \\ &= \begin{bmatrix} -3\ \\ \ \ 5\ \\ \ \ 2\ \\ \ \ 0\ \end{bmatrix} - \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} + \begin{bmatrix}\ \ \frac{3}{2}\ \\ -\frac{3}{2}\ \\ \ \ \frac{3}{2}\ \\ -\frac{3}{2}\ \end{bmatrix} = \begin{bmatrix} -\frac{5}{2} \\ \ \ \frac{5}{2} \\ \ \ \frac{5}{2} \\ -\frac{5}{2} \end{bmatrix} \end{align*} $$
Normalize $\mathbf{a}_3-\mathbf{p}_3$.
$$ \begin{align*} r_{33} &= \|\mathbf{a}_3 - \mathbf{p}_3\| \\ \\ \mathbf{q}_3 &= \dfrac{\mathbf{a}_3-\mathbf{p}_3}{\|\mathbf{a}_3 - \mathbf{p}_3\|} = \dfrac{1}{r_{33}}(\mathbf{a}_3-\mathbf{p}_3) \end{align*} $$
Our computations give us
$$ \begin{align*} r_{33} &= \sqrt{\left(-\frac{5}{2}\right)^2 + \left(\frac{5}{2}\right)^2 + \left(\frac{5}{2}\right)^2 + \left(-\frac{5}{2}\right)^2} = 5 \\ \\ \mathbf{q}_3 &= \dfrac{1}{5}\begin{bmatrix} -\frac{5}{2} \\ \ \ \frac{5}{2} \\ \ \ \frac{5}{2} \\ -\frac{5}{2} \end{bmatrix} = \begin{bmatrix} -\frac{1}{2} \\ \ \ \frac{1}{2} \\ \ \ \frac{1}{2} \\ -\frac{1}{2} \end{bmatrix} \end{align*} $$
Solving for $\mathbf{a}_3$
$$ \begin{align*} r_{33}\mathbf{q}_3 &= \mathbf{a}_3 - \mathbf{p}_3 \\ \\ \mathbf{a}_3 &= \mathbf{p}_3 + r_{33}\mathbf{q}_3 = r_{13}\mathbf{q}_1 + r_{23}\mathbf{q}_2 + r_{33}\mathbf{q}_3 \\ \\ \mathbf{a}_3 &= \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix} \begin{bmatrix} r_{13} \\ r_{23} \\ r_{33} \end{bmatrix} = Q\mathbf{r}_3 \end{align*} $$
Performing the computations
$$ \begin{align*} \mathbf{a}_3 &= 2\begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} - 3\begin{bmatrix}\ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \end{bmatrix} + 5\begin{bmatrix} -\frac{1}{2} \\ \ \ \frac{1}{2} \\ \ \ \frac{1}{2} \\ -\frac{1}{2} \\ \end{bmatrix} \\ \\ &= 2\mathbf{q}_1 - 3\mathbf{q}_2 + 5\mathbf{q}_3 = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix}\begin{bmatrix}\ \ 2\ \\ -3\ \\ \ \ 5\ \end{bmatrix} \end{align*} $$
Putting these three matrix-vector computations together
$$ \begin{align*} Q &= \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix} = \begin{bmatrix}\ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ & -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ & -\frac{1}{2}\ &\ \ \frac{1}{2}\ \\ \ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ \\ \ \ \frac{1}{2}\ & -\frac{1}{2}\ & -\frac{1}{2}\ \end{bmatrix} \\ \\ R &= \begin{bmatrix} \mathbf{r}_1 & \mathbf{r}_2 & \mathbf{r}_3 \end{bmatrix} = \begin{bmatrix} r_{11} & r_{12} & r_{13} \\ 0 & r_{22} & r_{23} \\ 0 & 0 & r_{33} \end{bmatrix} = \begin{bmatrix}\ \ 2\ & -4\ &\ \ 2\ \\ \ \ 0\ &\ \ 4\ & -3\ \\ \ \ 0\ &\ \ 0\ &\ \ 5\ \end{bmatrix} \\ \\ A &= QR \end{align*} $$
This is the $QR$ factorization of matrix $A$, the decomposition of a matrix into a product of a matrix $Q$ with orthonormal column vectors and a square matrix $R$ of coefficients of the columns of matrix $Q$.
5.3b.5 Gram-Schmidt or QR Factorization¶
Theorem 5.3b.2¶
The Gram-Schmidt or QR Factorization Theorem
If $A\in\mathbb{R}^{m\times n}$ is an $m\times n$ matrix, then $A$ can be factored into a product $QR$, where $Q$ is an $m\times n$ matrix with orthonormal column vectors, and $R$ is an upper triangular $n\times n$ matrix.
Notice that if $A$ is a square $n\times n$ matrix, then $Q$ is also square, and
$$ |A| = |QR| = |Q||R| = \pm\,|R| = \pm\displaystyle\prod_{k=1}^n r_{kk} $$
Corollary 5.3b.3¶
If $A\in\mathbb{R}^{m\times n}$ is an $m\times n$ matrix with rank $n$, then $A$ can be factored into a product $QR$, where $Q$ is an $m\times n$ matrix with orthonormal column vectors, and $R$ is an upper triangular $n\times n$ matrix with positive entries along the diagonal.
Notice that the theorem requires,
Matrix $A$ must be full rank, that is all of the columns of matrix $A$ must be linearly independent.
The coefficient matrix $R$ will always be nonsingular since the determinant of $R$ is a product of nonzero numbers.
5.3b.6 Exercises¶
Exercise 1¶
Consider the following matrix $$ A = \begin{bmatrix}\ 1\ &\ \ 0\ & -3\ \\ \ 1\ & -4\ &\ \ 5\ \\ \ 1\ &\ \ 0\ &\ \ 2\ \\ \ 1\ & -4\ &\ \ 0\ \end{bmatrix} $$
Compute the $QR$ factorization of matrix $A$.
Check Your Work
$$ \begin{align*} Q &= \begin{bmatrix}\ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ & -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ & -\frac{1}{2}\ &\ \ \frac{1}{2}\ \\ \ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ \\ \ \ \frac{1}{2}\ & -\frac{1}{2}\ & -\frac{1}{2}\ \end{bmatrix} \\ \\ R &= \begin{bmatrix}\ \ 2\ & -4\ &\ \ 2\ \\ \ \ 0\ &\ \ 4\ & -3\ \\ \ \ 0\ &\ \ 0\ &\ \ 5\ \end{bmatrix} \end{align*} $$
Follow Along
$$ \begin{align*} r_{11} &= \sqrt{ 1^2 + 1^2 + 1^2 + 1^2 } = 2 \\ \\ \mathbf{q}_1 &= \frac{\mathbf{a}_1}{\left\|\mathbf{a}_1\right\|} = \frac{\mathbf{a}_1}{r_{11}} = \frac{1}{2}\begin{bmatrix}\ 1\ \\ \ 1\ \\ \ 1\ \\ \ 1\ \end{bmatrix} \\ \mathbf{r}_1 &= \begin{bmatrix}\ 2\ \\ \ 0\ \\ \ 0\ \end{bmatrix} \\ \\ \mathbf{p}_2 &= \text{Proj}_{\mathbf{q}_1}\mathbf{a}_2 = \frac{\langle\mathbf{q}_1,\mathbf{a}_2\rangle}{\langle\mathbf{q_1},\mathbf{q}_1\rangle}\mathbf{q}_1 = \frac{r_{12}}{1}\mathbf{q}_1 = \left(0\cdot\frac{1}{2} - 4\cdot\frac{1}{2} + 0\cdot\frac{1}{2} - 4\cdot\frac{1}{2} \right)\begin{bmatrix}\ \frac{1}{2}\ \\ \ \frac{1}{2}\ \\ \ \frac{1}{2}\ \\ \ \frac{1}{2}\ \end{bmatrix} = \begin{bmatrix} -2\ \\ -2\ \\ -2\ \\ -2\ \end{bmatrix} \\ \\ \mathbf{a}_2 - \mathbf{p}_2 &= \begin{bmatrix}\ \ 0\ \\ -4\ \\ \ \ 0\ \\ -4\ \end{bmatrix} - \begin{bmatrix} -2\ \\ -2\ \\ -2\ \\ -2\ \end{bmatrix} = \begin{bmatrix}\ \ 2\ \\ -2\ \\ \ \ 2\ \\ -2\ \end{bmatrix} \\ \\ \mathbf{q}_2 &= \frac{\mathbf{a}_2 - \mathbf{p}_2}{\left\|\mathbf{a}_2 - \mathbf{p}_2\right\|} = \frac{\mathbf{a}_2 - \mathbf{p}_2}{r_{22}} = \frac{1}{4}\begin{bmatrix}\ \ 2\ \\ -2\ \\ \ \ 2\ \\ -2\ \end{bmatrix} = \begin{bmatrix}\ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \end{bmatrix} \\ \mathbf{r}_2 &= \begin{bmatrix} -4\ \\ \ \ 4\ \\ \ \ 0\ \end{bmatrix} \\ \\ \mathbf{p}_3 &= \text{Proj}_{\mathbf{q}_1}\mathbf{a}_3 + \text{Proj}_{\mathbf{q}_2}\mathbf{a}_3 = \frac{\langle\mathbf{q}_1,\mathbf{a}_3\rangle}{\langle\mathbf{q_1},\mathbf{q}_1\rangle}\mathbf{q}_1 + \frac{\langle\mathbf{q}_2,\mathbf{a}_3\rangle}{\langle\mathbf{q_2},\mathbf{q}_2\rangle}\mathbf{q}_2 = r_{13}\mathbf{q_1} + r_{23}\mathbf{q}_2 \\ &= \left( -3\cdot\frac{1}{2} + 5\cdot\frac{1}{2} + 2\cdot\frac{1}{2} + 0\cdot\frac{1}{2} \right)\begin{bmatrix}\ \frac{1}{2}\ \\ \ \frac{1}{2}\ \\ \ \frac{1}{2}\ \\ \ \frac{1}{2}\ \end{bmatrix} + \left( -3\cdot\frac{1}{2} - 5\cdot\frac{1}{2} + 2\cdot\frac{1}{2} - 0\cdot\frac{1}{2} \right)\begin{bmatrix}\ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \end{bmatrix} \\ &= \begin{bmatrix}\ 1\ \\ \ 1\ \\ \ 1\ \\ \ 1\ \end{bmatrix} + \begin{bmatrix} -\frac{3}{2}\ \\ \ \ \frac{3}{2}\ \\ -\frac{3}{2}\ \\ \ \ \frac{3}{2}\ \end{bmatrix} = \begin{bmatrix} -\frac{1}{2}\ \\ \ \ \frac{5}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{5}{2}\ \end{bmatrix} \\ \\ \mathbf{a}_3-\mathbf{p}_3 &= \begin{bmatrix} -3\ \\ \ \ 5\ \\ \ \ 2\ \\ \ \ 0\ \end{bmatrix} - \begin{bmatrix} -\frac{1}{2}\ \\ \ \ \frac{5}{2}\ \\ -\frac{1}{2}\ \\ \ \ \frac{5}{2}\ \end{bmatrix} = \begin{bmatrix} -\frac{5}{2}\ \\ \ \ \frac{5}{2}\ \\ \ \ \frac{5}{2}\ \\ -\frac{5}{2}\ \end{bmatrix} \\ \\ \mathbf{q}_3 &= \frac{\mathbf{a}_3-\mathbf{p}_3}{\left\|\mathbf{a}_3-\mathbf{p}_3\right\|} = \frac{\mathbf{a}_3-\mathbf{p}_3}{r_{33}} = \frac{1}{5}\begin{bmatrix} -\frac{5}{2}\ \\ \ \ \frac{5}{2}\ \\ \ \ \frac{5}{2}\ \\ -\frac{5}{2}\ \end{bmatrix} = \begin{bmatrix} -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ \ \ \frac{1}{2}\ \\ -\frac{1}{2}\ \end{bmatrix} \\ \mathbf{r}_3 &= \begin{bmatrix}\ \ 2\ \\ -3\ \\ \ \ 5\ \end{bmatrix} \\ \\ Q &= \begin{bmatrix}\ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ & -\frac{1}{2}\ \\ \ \ \frac{1}{2}\ & -\frac{1}{2}\ &\ \ \frac{1}{2}\ \\ \ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ &\ \ \frac{1}{2}\ \\ \ \ \frac{1}{2}\ & -\frac{1}{2}\ & -\frac{1}{2}\ \end{bmatrix} \\ \\ R &= \begin{bmatrix}\ \ 2\ & -4\ &\ \ 2\ \\ \ \ 0\ &\ \ 4\ & -3\ \\ \ \ 0\ &\ \ 0\ &\ \ 5\ \end{bmatrix} \\ \end{align*} $$
Exercise 2¶
Consider the following matrix $$ A = \begin{bmatrix}\ \ 3\ &\ \ 0\ & -2\ \\ \ \ 3\ & \ \ 8\ &\ \ 5\ \\ \ \ 3\ &\ \ 4\ &\ \ 0\ \\ \ \ 0\ & -4\ & -2\ \end{bmatrix} $$
Determine the $QR$ factorization of matrix $A$.
Check Your Work
$$ \begin{align*} Q &= \begin{bmatrix}\ \ \frac{1}{\sqrt{3}}\ & -\frac{1}{\sqrt{3}}\ &\ \ 0\ \\ \ \ \frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ \\ \ \ \frac{1}{\sqrt{3}}\ &\ \ 0\ & -\frac{1}{\sqrt{3}}\ \\ \ \ 0\ & -\frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ \end{bmatrix} \\ \\ R &= \begin{bmatrix}\ \ 3\sqrt{3}\ &\ \ 4\sqrt{3}\ &\ \ \sqrt{3}\ \\ \ \ 0\ &\ \ 4\sqrt{3}\ & 3\sqrt{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ \sqrt{3}\ \end{bmatrix} \end{align*} $$
Follow Along
$$ \begin{align*} r_{11} &= \sqrt{ (-3)^2 + (-3)^2 + (-3)^2 + 0^2 } = 3\sqrt{3} \\ \\ \mathbf{q}_1 &= \frac{\mathbf{a}_1}{\left\|\mathbf{a}_1\right\|} = \frac{\mathbf{a}_1}{r_{11}} = \frac{1}{\sqrt{3}}\begin{bmatrix}\ 1\ \\ \ 1\ \\ \ 1\ \\ \ 0\ \end{bmatrix} \\ \mathbf{r}_1 &= \begin{bmatrix}\ 3\sqrt{3}\ \\ \ 0\ \\ \ 0\ \end{bmatrix} \\ \\ \mathbf{p}_2 &= \text{Proj}_{\mathbf{q}_1}\mathbf{a}_2 = \frac{\langle\mathbf{q}_1,\mathbf{a}_2\rangle}{\langle\mathbf{q_1},\mathbf{q}_1\rangle}\mathbf{q}_1 = \frac{r_{12}}{1}\mathbf{q}_1 = \left(0\cdot\frac{1}{\sqrt{3}} + 8\cdot\frac{1}{\sqrt{3}} + 4\cdot\frac{1}{\sqrt{3}} - 4\cdot 0 \right)\begin{bmatrix}\ \frac{1}{\sqrt{3}}\ \\ \ \frac{1}{\sqrt{3}}\ \\ \ \frac{1}{\sqrt{3}}\ \\ \ 0\ \end{bmatrix} = \begin{bmatrix}\ 4\ \\ \ 4\ \\ \ 4\ \\ \ 0\ \end{bmatrix} \\ \\ \mathbf{a}_2 - \mathbf{p}_2 &= \begin{bmatrix}\ \ 0\ \\ \ \ 8\ \\ \ \ 4\ \\ -4\ \end{bmatrix} - \begin{bmatrix}\ 4\ \\ \ 4\ \\ \ 4\ \\ \ 0\ \end{bmatrix} = \begin{bmatrix} -4\ \\ \ \ 4\ \\ \ \ 0\ \\ -4\ \end{bmatrix} \\ \\ \mathbf{q}_2 &= \frac{\mathbf{a}_2 - \mathbf{p}_2}{\left\|\mathbf{a}_2 - \mathbf{p}_2\right\|} = \frac{\mathbf{a}_2 - \mathbf{p}_2}{r_{22}} = \frac{1}{4\sqrt{3}}\begin{bmatrix} -4\ \\ \ \ 4\ \\ \ \ 0\ \\ -4\ \end{bmatrix} = \begin{bmatrix} -\frac{1}{\sqrt{3}}\ \\ \ \ \frac{1}{\sqrt{3}}\ \\ \ \ 0\ \\ -\frac{1}{\sqrt{3}}\ \end{bmatrix} \\ \mathbf{r}_2 &= \begin{bmatrix}\ \ 4\sqrt{3}\ \\ \ \ 4\sqrt{3}\ \\ \ \ 0\ \end{bmatrix} \\ \\ \mathbf{p}_3 &= \text{Proj}_{\mathbf{q}_1}\mathbf{a}_3 + \text{Proj}_{\mathbf{q}_2}\mathbf{a}_3 = \frac{\langle\mathbf{q}_1,\mathbf{a}_3\rangle}{\langle\mathbf{q_1},\mathbf{q}_1\rangle}\mathbf{q}_1 + \frac{\langle\mathbf{q}_2,\mathbf{a}_3\rangle}{\langle\mathbf{q_2},\mathbf{q}_2\rangle}\mathbf{q}_2 = r_{13}\mathbf{q_1} + r_{23}\mathbf{q}_2 \\ &= \left( -2\cdot\frac{1}{\sqrt{3}} + 5\cdot\frac{1}{\sqrt{3}} + 0\cdot\frac{1}{\sqrt{3}} - 2\cdot 0 \right)\begin{bmatrix}\ \frac{1}{\sqrt{3}}\ \\ \ \frac{1}{\sqrt{3}}\ \\ \ \frac{1}{\sqrt{3}}\ \\ \ 0 \end{bmatrix} + \left( -2\left(-\frac{1}{\sqrt{3}}\right) + 5\cdot\frac{1}{\sqrt{3}} + 0\cdot\frac{1}{\sqrt{3}} - 2\left(-\frac{1}{\sqrt{3}}\right) \right)\begin{bmatrix} -\frac{1}{\sqrt{3}}\ \\ \ \ \frac{1}{\sqrt{3}}\ \\ \ \ 0\ \\ -\frac{1}{\sqrt{3}}\ \end{bmatrix} \\ &= \begin{bmatrix}\ 1\ \\ \ 1\ \\ \ 1\ \\ \ 0\ \end{bmatrix} + \begin{bmatrix} -3\ \\ \ \ 3\ \\ \ \ 0\ \\ -3\ \end{bmatrix} = \begin{bmatrix} -2\ \\ \ \ 4\ \\ \ \ 1\ \\ -3\ \end{bmatrix} \\ \\ \mathbf{a}_3-\mathbf{p}_3 &= \begin{bmatrix} -2\ \\ \ \ 5\ \\ \ \ 0\ \\ -2\ \end{bmatrix} - \begin{bmatrix} -2 \\ \ \ 4\ \\ \ \ 1\ \\ -3\ \end{bmatrix} = \begin{bmatrix}\ \ 0\ \\ \ \ 1\ \\ -1\ \\ \ \ 1\ \end{bmatrix} \\ \\ \mathbf{q}_3 &= \frac{\mathbf{a}_3-\mathbf{p}_3}{\left\|\mathbf{a}_3-\mathbf{p}_3\right\|} = \frac{\mathbf{a}_3-\mathbf{p}_3}{r_{33}} = \frac{1}{\sqrt{3}}\begin{bmatrix}\ \ 0\ \\ \ \ 1\ \\ -1\ \\ \ \ 1\ \end{bmatrix} = \begin{bmatrix}\ \ 0\ \\ \ \ \frac{1}{\sqrt{3}}\ \\ -\frac{1}{\sqrt{3}}\ \\ \ \ \frac{1}{\sqrt{3}}\ \end{bmatrix} \\ \mathbf{r}_3 &= \begin{bmatrix}\ \ \sqrt{3}\ \\ \ \ 3\sqrt{3}\ \\ \ \ \sqrt{3}\ \end{bmatrix} \\ \\ Q &= \begin{bmatrix}\ \ \frac{1}{\sqrt{3}}\ & -\frac{1}{\sqrt{3}}\ &\ \ 0\ \\ \ \ \frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ \\ \ \ \frac{1}{\sqrt{3}}\ &\ \ 0\ & -\frac{1}{\sqrt{3}}\ \\ \ \ 0\ & -\frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ \end{bmatrix} \\ \\ R &= \begin{bmatrix}\ \ 3\sqrt{3}\ &\ \ 4\sqrt{3}\ &\ \ \sqrt{3}\ \\ \ \ 0\ &\ \ 4\sqrt{3}\ & 3\sqrt{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ \sqrt{3}\ \end{bmatrix} \\ \\ QR &= \begin{bmatrix}\ \ \frac{1}{\sqrt{3}}\ & -\frac{1}{\sqrt{3}}\ &\ \ 0\ \\ \ \ \frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ \\ \ \ \frac{1}{\sqrt{3}}\ &\ \ 0\ & -\frac{1}{\sqrt{3}}\ \\ \ \ 0\ & -\frac{1}{\sqrt{3}}\ &\ \ \frac{1}{\sqrt{3}}\ \end{bmatrix}\begin{bmatrix}\ \ 3\sqrt{3}\ &\ \ 4\sqrt{3}\ &\ \ \sqrt{3}\ \\ \ \ 0\ &\ \ 4\sqrt{3}\ & 3\sqrt{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ \sqrt{3}\ \end{bmatrix} \\ \\ &= \frac{1}{\sqrt{3}}\begin{bmatrix}\ \ 1\ & -1\ &\ \ 0\ \\ \ \ 1\ &\ \ 1\ &\ \ 1\ \\ \ \ 1\ &\ \ 0\ & -1\ \\ \ \ 0\ & -1\ &\ \ 1\ \end{bmatrix}\begin{bmatrix}\ \ 3\ &\ \ 4\ &\ \ 1\ \\ \ \ 0\ &\ \ 4\ &\ \ 3\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ \end{bmatrix}\sqrt{3} = \begin{bmatrix}\ \ 3\ &\ \ 0\ & -2\ \\ \ \ 3\ &\ \ 8\ &\ \ 5\ \\ \ \ 3\ &\ \ 4\ &\ \ 0\ \\ \ \ 0\ & -4\ & -2\ \end{bmatrix}\qquad{\color{green}\Large{\checkmark}} \end{align*} $$
Your use of this self-initiated mediated course material is subject to our Creative Commons License 4.0