## Linear Algebra and Its Applications, Exercise 3.4.6

Exercise 3.4.6. Given the matrix $Q = \begin{bmatrix} \frac{1}{\sqrt{3}}&\frac{1}{\sqrt{14}}&\qquad \\ \frac{1}{\sqrt{3}}&\frac{2}{\sqrt{14}}&\qquad \\ \frac{1}{\sqrt{3}}&-\frac{3}{\sqrt{14}}&\qquad \end{bmatrix}$

find entries for the third column such that $Q$ is orthogonal. How much freedom do you have to choose the entries? Finally, verify that both the columns and rows are orthonormal.

Answer: In order for $Q$ to be orthogonal all three of its rows must be orthonormal, with length of 1. We start with the vector forming the first row of $Q$.  For its length to be 1 the square of the last entry of the first row must be equal to $1 - (\frac{1}{\sqrt{3}})^2 - (\frac{1}{\sqrt{14}})^2 = 1 - \frac{1}{3} - \frac{1}{14} = 1 - \frac{14}{42} - \frac{3}{42} = \frac{25}{42}$

so that the entry itself would be $\pm \sqrt{\frac{25}{42}} = \pm \frac{5}{\sqrt{42}}$.

Similarly the square of the last entry of the second row must be $1 - (\frac{1}{\sqrt{3}})^2 - (\frac{2}{\sqrt{14}})^2 = 1 - \frac{1}{3} - \frac{4}{14} = 1 - \frac{14}{42} - \frac{12}{42} = \frac{16}{42}$

so that the entry itself would be $\pm \sqrt{\frac{16}{42}} = \pm \frac{4}{\sqrt{42}}$.

Finally, the square of the last entry of the third row must be $1 - (\frac{1}{\sqrt{3}})^2 - (\frac{3}{\sqrt{14}})^2 = 1 - \frac{1}{3} - \frac{9}{14} = 1 - \frac{14}{42} - \frac{27}{42} = \frac{1}{42}$

so that the entry itself would be $\pm \sqrt{\frac{1}{42}} = \pm \frac{1}{\sqrt{42}}$.

We have two possible choices for the last entry of the first row, $\frac{5}{\sqrt{42}}$ and $-\frac{5}{\sqrt{42}}$. Suppose that we choose $\frac{5}{\sqrt{42}}$. Since the first row and the second row are supposed to be orthogonal, we must choose $-\frac{4}{\sqrt{42}}$ for the last entry of the second row, so that the dot product of the two rows is zero: $\frac{1}{\sqrt{3}} \cdot \frac{1}{\sqrt{3}} + \frac{1}{\sqrt{14}} \cdot \frac{2}{\sqrt{14}} + \frac{5}{\sqrt{42}} \cdot (-\frac{4}{\sqrt{42}}) = \frac{1}{3} + \frac{2}{14} - \frac{20}{42} = \frac{14}{42} + \frac{6}{42} - \frac{20}{42} = 0$

We must then choose $-\frac{1}{\sqrt{42}}$ for the last entry in the third row, so that the dot product of the first row and the third row is zero: $\frac{1}{\sqrt{3}} \cdot \frac{1}{\sqrt{3}} + \frac{1}{\sqrt{14}} \cdot (-\frac{3}{\sqrt{14}}) + \frac{5}{\sqrt{42}} \cdot (-\frac{1}{\sqrt{42}}) = \frac{1}{3} - \frac{3}{14} - \frac{5}{42} = \frac{14}{42} - \frac{9}{42} - \frac{5}{42} = 0$

and the dot product of the second and third rows is zero: $\frac{1}{\sqrt{3}} \cdot \frac{1}{\sqrt{3}} + \frac{2}{\sqrt{14}} \cdot (-\frac{3}{\sqrt{14}}) + (-\frac{4}{\sqrt{42}}) \cdot (-\frac{1}{\sqrt{42}}) = \frac{1}{3} - \frac{6}{14} + \frac{4}{42} = \frac{14}{42} - \frac{18}{42} + \frac{4}{42} = 0$

The resulting value for the matrix $Q$ is $Q = \begin{bmatrix} \frac{1}{\sqrt{3}}&\frac{1}{\sqrt{14}}&\frac{5}{\sqrt{42}} \\ \frac{1}{\sqrt{3}}&\frac{2}{\sqrt{14}}&-\frac{4}{\sqrt{42}} \\ \frac{1}{\sqrt{3}}&-\frac{3}{\sqrt{14}}&-\frac{1}{\sqrt{42}} \end{bmatrix}$

The dot product of the first column with itself is $(\frac{1}{\sqrt{3}})^2 + (\frac{1}{\sqrt{3}})^2 + (\frac{1}{\sqrt{3}})^2 = \frac{1}{3} + \frac{1}{3} + \frac{1}{3} = 1$

The dot product of the second column with itself is $(\frac{1}{\sqrt{14}})^2 + (\frac{2}{\sqrt{14}})^2 + (-\frac{3}{\sqrt{14}})^2 = \frac{1}{14} + \frac{4}{14} + \frac{9}{14} = 1$

The dot product of the third column with itself is $(\frac{5}{\sqrt{42}})^2 + (-\frac{4}{\sqrt{42}})^2 + (-\frac{1}{\sqrt{42}})^2 = \frac{25}{42} + \frac{16}{42} + \frac{1}{42} = 1$

Thus all three columns have length 1.

We also have the dot product of the first and second columns as zero: $\frac{1}{\sqrt{3}} \cdot \frac{1}{\sqrt{14}} + \frac{1}{\sqrt{3}} \cdot \frac{2}{\sqrt{14}} + \frac{1}{\sqrt{3}} \cdot (-\frac{3}{\sqrt{14}}) = \frac{1}{\sqrt{42}} + \frac{2}{\sqrt{42}} - \frac{3}{\sqrt{42}} = 0$

the dot product of the first and third columns as zero: $\frac{1}{\sqrt{3}} \cdot \frac{5}{\sqrt{42}} + \frac{1}{\sqrt{3}} \cdot (-\frac{4}{\sqrt{42}}) + \frac{1}{\sqrt{3}} \cdot (-\frac{1}{\sqrt{42}}) = \frac{5}{\sqrt{126}} - \frac{4}{\sqrt{126}} - \frac{1}{\sqrt{126}} = 0$

and the dot product of the second and third columns as zero: $\frac{1}{\sqrt{14}} \cdot \frac{5}{\sqrt{42}} + \frac{2}{\sqrt{14}} \cdot (-\frac{4}{\sqrt{42}}) + (-\frac{3}{\sqrt{14}}) \cdot (-\frac{1}{\sqrt{42}}) = \frac{5}{\sqrt{588}} - \frac{8}{\sqrt{588}} + \frac{3}{\sqrt{588}} = 0$

Since all three rows are orthonormal (by construction) and all three columns are orthonormal, the matrix $Q$ is an orthogonal matrix.

Recall that we originally had two choices for the last entry of the first row. If we instead choose $-\frac{5}{\sqrt{42}}$ for the last entry in the first row, we must choose $\frac{4}{\sqrt{42}}$ for the last entry of the second row and $\frac{1}{\sqrt{42}}$ for the last entry in the third row, so that $Q = \begin{bmatrix} \frac{1}{\sqrt{3}}&\frac{1}{\sqrt{14}}&-\frac{5}{\sqrt{42}} \\ \frac{1}{\sqrt{3}}&\frac{2}{\sqrt{14}}&\frac{4}{\sqrt{42}} \\ \frac{1}{\sqrt{3}}&-\frac{3}{\sqrt{14}}&\frac{1}{\sqrt{42}} \end{bmatrix}$

Verifying that this alternative value for $Q$ is an orthogonal matrix is left as an exercise for the reader.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition , Dr Strang’s introductory textbook Introduction to Linear Algebra, Fifth Edition and the accompanying free online course, and Dr Strang’s other books .

This entry was posted in linear algebra and tagged . Bookmark the permalink.