Tutorials › Linear Algebra › Exact Tests for Orthogonality in Worked Matrix Examples

Orthogonal Matrices and Isometries · Tutorial 717 of 1000

Exact Tests for Orthogonality in Worked Matrix Examples

Use exact inner products and matrix multiplication to test orthogonality, then solve the equations needed to complete orthonormal columns.

Intermediate 9 min read

What You'll Learn

  • State the exact definition of an orthogonal real square matrix.
  • Translate column inner products into the entries of Q^TQ.
  • Test candidate matrices using exact arithmetic.
  • Distinguish orthogonal columns from orthonormal columns.
  • Solve for unknown entries that complete specified orthonormal columns.

What an Exact Orthogonality Test Checks

A square matrix is orthogonal when its columns form an orthonormal list: each column has length one, and distinct columns have inner product zero. This gives a direct test that does not require guessing what transformation the matrix represents. Compute the column inner products, or multiply the transpose by the matrix, and compare the result with the identity matrix.

Throughout this tutorial, matrices and vectors are real. For \(\mathbf{u},\mathbf{v}\in\mathbb{R}^n\), their inner product is \(\mathbf{u}\cdot\mathbf{v}=\mathbf{u}^{\top}\mathbf{v}\), and their norm is \(\|\mathbf{u}\|=\sqrt{\mathbf{u}\cdot\mathbf{u}}\). A list of columns is orthonormal if every column has norm \(1\) and every pair of distinct columns has inner product \(0\). The identity matrix \(\mathbf{I}_n\) has \(1\) on its diagonal and \(0\) elsewhere.

Definition: A real square matrix \(\mathbf{Q}\in\mathbb{R}^{n\times n}\) is orthogonal if \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\). Equivalently, its columns are an orthonormal list.

The word “orthogonal” in the definition requires both perpendicularity and unit length. Checking that columns are perpendicular is not enough: a column may be perpendicular to the others but still have the wrong length.

Why the Column Test and the Matrix Test Agree

Write the columns of \(\mathbf{Q}\) as \(\mathbf{q}_1,\dots,\mathbf{q}_n\). The entry in row \(i\), column \(j\) of \(\mathbf{Q}^{\top}\mathbf{Q}\) is the inner product of columns \(i\) and \(j\). Thus the diagonal entries record squared column lengths, while the off-diagonal entries record pairwise inner products.

Theorem (Column test for orthogonality): For a real square matrix \(\mathbf{Q}=[\mathbf{q}_1\ \cdots\ \mathbf{q}_n]\), the following conditions are equivalent: (1) \(\mathbf{Q}\) is orthogonal; (2) \(\mathbf{q}_i\cdot\mathbf{q}_j=1\) when \(i=j\), and \(\mathbf{q}_i\cdot\mathbf{q}_j=0\) when \(i\ne j\); (3) the columns of \(\mathbf{Q}\) are orthonormal.

Proof. By matrix multiplication, the entry of \(\mathbf{Q}^{\top}\mathbf{Q}\) in row \(i\), column \(j\) is \((\mathbf{Q}^{\top}\mathbf{Q})_{ij}=\sum_{k=1}^{n}q_{ki}q_{kj}\). The \(i\)th column of \(\mathbf{Q}\) has entries \(q_{1i},\dots,q_{ni}\), so this sum is exactly \(\mathbf{q}_i\cdot\mathbf{q}_j\). The corresponding entry of \(\mathbf{I}_n\) is \(1\) if \(i=j\) and \(0\) if \(i\ne j\). Therefore \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) holds exactly when the stated inner-product conditions hold. When \(i=j\), the condition is \(\mathbf{q}_i\cdot\mathbf{q}_i=1\), which is equivalent to \(\|\mathbf{q}_i\|=1\); when \(i\ne j\), it says the columns are perpendicular. These are precisely the requirements that the columns be orthonormal. \(\square\)

This proof gives a practical rule: calculate every column's squared norm and every distinct pair's inner product. A single wrong value disproves orthogonality. To confirm orthogonality, all \(n\) squared norms must equal \(1\), and all \(n(n-1)/2\) distinct pairwise inner products must equal \(0\). Exact fractions and integers make these checks decisive, without relying on a numerical tolerance.

Testing a Matrix That Fails

Worked Example: Rejecting a Candidate Matrix

Determine whether \(\mathbf{A}=\begin{bmatrix}1&2\\0&1\end{bmatrix}\) is orthogonal.

Its columns are \(\mathbf{a}_1=(1,0)^{\top}\) and \(\mathbf{a}_2=(2,1)^{\top}\). Their squared norms and inner product are

$$ \mathbf{a}_1\cdot\mathbf{a}_1=1^2+0^2=1,\qquad \mathbf{a}_2\cdot\mathbf{a}_2=2^2+1^2=5,\qquad \mathbf{a}_1\cdot\mathbf{a}_2=1\cdot2+0\cdot1=2. $$

The second column does not have unit length, and the columns are not perpendicular. The matrix therefore cannot be orthogonal. The transpose calculation gives the same verdict:

$$ \mathbf{A}^{\top}\mathbf{A} = \begin{bmatrix}1&0\\2&1\end{bmatrix} \begin{bmatrix}1&2\\0&1\end{bmatrix} = \begin{bmatrix}1&2\\2&5\end{bmatrix} \ne \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

Check: the diagonal entries \(1,5\) are the two squared column norms, and the off-diagonal entries \(2,2\) are the inner product of the columns. These match the direct calculations.

For a small matrix, either approach is convenient. The inner-product method makes the meaning of a failed entry transparent. The product \(\mathbf{Q}^{\top}\mathbf{Q}\) organizes every check in one calculation and is especially useful when the matrix has several columns.

Confirming Orthogonality with Exact Arithmetic

Worked Example: Verifying a Three-by-Three Matrix

Test whether the following matrix is orthogonal:

$$ \mathbf{Q}=\frac{1}{3} \begin{bmatrix} 1&2&2\\ 2&1&-2\\ 2&-2&1 \end{bmatrix}. $$

Let the columns of the integer matrix inside the factor \(1/3\) be \(\mathbf{c}_1=(1,2,2)^{\top}\), \(\mathbf{c}_2=(2,1,-2)^{\top}\), and \(\mathbf{c}_3=(2,-2,1)^{\top}\). The columns of \(\mathbf{Q}\) are \(\mathbf{c}_1/3,\mathbf{c}_2/3,\mathbf{c}_3/3\). First compute the squared norms before scaling:

$$ \mathbf{c}_1\cdot\mathbf{c}_1=1+4+4=9,\qquad \mathbf{c}_2\cdot\mathbf{c}_2=4+1+4=9,\qquad \mathbf{c}_3\cdot\mathbf{c}_3=4+4+1=9. $$

Each squared norm after scaling is \(9/3^2=1\). The unscaled pairwise inner products are

$$ \mathbf{c}_1\cdot\mathbf{c}_2=2+2-4=0,\qquad \mathbf{c}_1\cdot\mathbf{c}_3=2-4+2=0,\qquad \mathbf{c}_2\cdot\mathbf{c}_3=4-2-2=0. $$

Scaling each column by \(1/3\) scales each pairwise inner product by \(1/9\), so the three inner products remain zero. Therefore the columns of \(\mathbf{Q}\) are orthonormal. To check by multiplication, the inner products just computed give

$$ \mathbf{Q}^{\top}\mathbf{Q} =\frac{1}{9} \begin{bmatrix} 9&0&0\\ 0&9&0\\ 0&0&9 \end{bmatrix} = \begin{bmatrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{bmatrix} =\mathbf{I}_3. $$

Check: the product equals \(\mathbf{I}_3\) exactly, not merely approximately, so the matrix passes the defining test.

Solving for Unknown Entries

When some columns are prescribed and another column is unknown, translate the requirements into equations before choosing entries. The unknown column must have inner product zero with each prescribed column, and its squared norm must equal \(1\). Solving the perpendicularity equations first gives candidate directions; the norm equation then fixes the scale.

Worked Example: Completing Two Orthonormal Columns

The first two columns of a real \(3\times3\) matrix are specified as \(\mathbf{u}=(1,2,2)^{\top}/3\) and \(\mathbf{v}=(2,1,-2)^{\top}/3\). Find all possible third columns \(\mathbf{x}=(a,b,c)^{\top}\) that make the three columns orthonormal.

First confirm that the given columns are already orthonormal. Their squared norms are \((1+4+4)/9=1\) and \((4+1+4)/9=1\), and their inner product is \((2+2-4)/9=0\). For the new column, impose the two perpendicularity conditions:

$$ \mathbf{u}\cdot\mathbf{x}=0 \quad\Longleftrightarrow\quad a+2b+2c=0, \qquad \mathbf{v}\cdot\mathbf{x}=0 \quad\Longleftrightarrow\quad 2a+b-2c=0. $$

The first equation gives \(a=-2b-2c\). Substitute this into the second equation:

$$ 2(-2b-2c)+b-2c=0 \quad\Longrightarrow\quad -3b-6c=0 \quad\Longrightarrow\quad b=-2c. $$

Then \(a=-2(-2c)-2c=2c\), so every vector perpendicular to both prescribed columns has the form \(\mathbf{x}=(2c,-2c,c)^{\top}\). Now impose unit length:

$$ \|\mathbf{x}\|^2=(2c)^2+(-2c)^2+c^2=9c^2=1 \quad\Longrightarrow\quad c=\frac{1}{3}\ \text{or}\ c=-\frac{1}{3}. $$

Thus the two possible third columns are \((2,-2,1)^{\top}/3\) and \((-2,2,-1)^{\top}/3\). For the first choice, the resulting matrix is

$$ \mathbf{Q}=\frac{1}{3} \begin{bmatrix} 1&2&2\\ 2&1&-2\\ 2&-2&1 \end{bmatrix}. $$

Check: the first two columns have squared norms \(1\) and inner product \(0\), as computed above. For the chosen third column, its squared norm is \((4+4+1)/9=1\), its inner product with \(\mathbf{u}\) is \((2-4+2)/9=0\), and its inner product with \(\mathbf{v}\) is \((4-2-2)/9=0\). Hence all three columns are orthonormal and \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_3\). Changing the sign of the third column preserves its norm and keeps both inner products zero, so the second choice works as well.

The two answers differ only by sign because the perpendicularity equations leave a line of possible vectors, and the unit-length condition selects its two unit vectors. The calculation also illustrates why both types of conditions matter: perpendicularity determines the direction but does not by itself determine the length.

A Reliable Testing Procedure

For a real \(n\times n\) candidate matrix, use this sequence. It is equivalent to the definition because the \((i,j)\) entry of \(\mathbf{Q}^{\top}\mathbf{Q}\) is exactly \(\mathbf{q}_i\cdot\mathbf{q}_j\), as established in the column test.

1
Identify the columns.
Write \(\mathbf{Q}=[\mathbf{q}_1\ \cdots\ \mathbf{q}_n]\). Keep track of columns rather than treating rows as the objects being tested.
2
Check each squared norm.
For every \(i\), compute \(\mathbf{q}_i\cdot\mathbf{q}_i\). Every result must equal \(1\).
3
Check each distinct pair.
For every \(i\ne j\), compute \(\mathbf{q}_i\cdot\mathbf{q}_j\). Every result must equal \(0\).
4
State the conclusion.
If all required values pass, then \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) and \(\mathbf{Q}\) is orthogonal. If any value fails, it is not orthogonal.

Common Mistake: Perpendicular Is Not Orthonormal

A frequent error is to check that the columns are pairwise perpendicular and conclude that the matrix is orthogonal, without checking their lengths. For example, the columns of \(\mathbf{B}=\begin{bmatrix}1&0\\0&2\end{bmatrix}\) are perpendicular, since \((1,0)^{\top}\cdot(0,2)^{\top}=0\). The incorrect conclusion is that \(\mathbf{B}\) is orthogonal. The correction is to check both squared norms: they are \(1\) and \(4\), not both \(1\). Indeed,

$$ \mathbf{B}^{\top}\mathbf{B} = \begin{bmatrix}1&0\\0&4\end{bmatrix} \ne \begin{bmatrix}1&0\\0&1\end{bmatrix} =\mathbf{I}_2. $$

So the columns are perpendicular but not orthonormal, and \(\mathbf{B}\) is not orthogonal. Keep the two checks separate: off-diagonal entries of \(\mathbf{Q}^{\top}\mathbf{Q}\) test perpendicularity, while diagonal entries test unit length.

Check Your Understanding

For each matrix test, use exact arithmetic and identify the specific inner product or squared norm that settles the question.

  1. Is \(\begin{bmatrix}3/5&-4/5\\4/5&3/5\end{bmatrix}\) orthogonal? Verify using column inner products.
  2. For \(\mathbf{C}=\begin{bmatrix}1&1\\1&-1\end{bmatrix}\), compute \(\mathbf{C}^{\top}\mathbf{C}\). What scalar multiple of \(\mathbf{C}\) is orthogonal?
  3. Can two columns with inner product zero make a matrix orthogonal if one column has squared norm \(4\)? Explain using the column test.
  4. Let the first column be \((0,1)^{\top}\). Find both possible second columns that make a real \(2\times2\) matrix orthogonal.
  5. Explain why checking only the off-diagonal entries of \(\mathbf{Q}^{\top}\mathbf{Q}\) is not a complete orthogonality test.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon