Tutorials › Linear Algebra › Common Errors in Orthogonality Calculations

Orthogonal Matrices and Isometries · Tutorial 718 of 1000

Common Errors in Orthogonality Calculations

Use dot products, matrix products, and dimensions to diagnose common mistakes when checking orthogonality.

Intermediate 10 min read

What You'll Learn

  • Distinguish orthogonal vectors from an orthogonal matrix.
  • Check whether columns are orthonormal using \(Q^{\top}Q\).
  • Explain why determinant \(1\) or \(-1\) does not prove orthogonality.
  • Interpret \(Q^{\top}Q=I\) for rectangular matrices.
  • Identify when \(QQ^{\top}\) is not the identity.
  • Correct common errors with exact matrix calculations.

Three Different Orthogonality Questions

Many mistakes in orthogonality calculations come from using a correct fact in the wrong setting. Two vectors can be orthogonal without being unit vectors. A square matrix is orthogonal only when its columns are orthonormal, not merely when its determinant is \(1\) or \(-1\). And the equation \(Q^{\top}Q=I\) can hold for a rectangular matrix, but that does not make the matrix an orthogonal matrix in the standard square-matrix sense.

We work over \(\mathbb{R}\). For vectors \(\mathbf{u},\mathbf{v}\in\mathbb{R}^n\), their dot product is \(\mathbf{u}\cdot\mathbf{v}=\mathbf{u}^{\top}\mathbf{v}\), and their norm is \(\|\mathbf{u}\|=\sqrt{\mathbf{u}\cdot\mathbf{u}}\). Vectors are orthogonal when their dot product is zero. A list is orthonormal when its vectors have norm \(1\) and distinct vectors in the list are orthogonal. These terms apply to vectors and lists; the term orthogonal matrix refers to a square matrix.

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 form an orthonormal list in \(\mathbb{R}^n\). For a rectangular matrix \(\mathbf{Q}\in\mathbb{R}^{m\times n}\), the equation \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) means that its columns are orthonormal; it does not, by itself, make \(\mathbf{Q}\) an orthogonal matrix.

The product \(\mathbf{Q}^{\top}\mathbf{Q}\) records dot products of columns: its entry in row \(i\), column \(j\) is \(\mathbf{q}_i\cdot\mathbf{q}_j\), where \(\mathbf{q}_i\) and \(\mathbf{q}_j\) are columns of \(\mathbf{Q}\). Thus the diagonal entries record squared column lengths, and the off-diagonal entries record dot products between distinct columns. To equal the identity, every column must have length \(1\), and distinct columns must be orthogonal.

Why \(Q^{\top}Q=I\) Tests Orthonormal Columns

Theorem: Let \(\mathbf{Q}\in\mathbb{R}^{m\times n}\) have columns \(\mathbf{q}_1,\dots,\mathbf{q}_n\). Then \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) if and only if the columns \(\mathbf{q}_1,\dots,\mathbf{q}_n\) are orthonormal. If \(m=n\), this is also exactly the condition that \(\mathbf{Q}\) is an orthogonal matrix.

Proof. The entry in position \((i,j)\) of \(\mathbf{Q}^{\top}\mathbf{Q}\) is \(\mathbf{q}_i^{\top}\mathbf{q}_j=\mathbf{q}_i\cdot\mathbf{q}_j\). If \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\), then for \(i=j\) this entry is \(1\), so \(\|\mathbf{q}_i\|^2=1\), and therefore \(\|\mathbf{q}_i\|=1\). For \(i\ne j\), the entry is \(0\), so \(\mathbf{q}_i\) and \(\mathbf{q}_j\) are orthogonal. Hence the columns are orthonormal. Conversely, if the columns are orthonormal, then each diagonal entry \(\mathbf{q}_i\cdot\mathbf{q}_i\) is \(1\) and each off-diagonal entry \(\mathbf{q}_i\cdot\mathbf{q}_j\) is \(0\). These are exactly the entries of \(\mathbf{I}_n\), so \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\). When \(m=n\), the defining equation is precisely the definition of an orthogonal matrix. \(\square\)

A useful consequence is that a rectangular matrix with \(n\) orthonormal columns in \(\mathbb{R}^m\) must have \(n\le m\). Indeed, if \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) and \(\mathbf{Q}\mathbf{x}=\mathbf{0}\), then \(\mathbf{x}^{\top}\mathbf{x}=\mathbf{x}^{\top}\mathbf{Q}^{\top}\mathbf{Q}\mathbf{x}=(\mathbf{Q}\mathbf{x})^{\top}(\mathbf{Q}\mathbf{x})=0\), which forces \(\mathbf{x}=\mathbf{0}\). Thus the columns are linearly independent. More than \(m\) vectors in \(\mathbb{R}^m\) cannot be linearly independent, so \(n\le m\).

Worked Example: Orthogonal Vectors Are Not Necessarily an Orthogonal Matrix

Consider \(\mathbf{u}=\begin{bmatrix}1\\1\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}1\\-1\end{bmatrix}\). Their dot product is \(1\cdot1+1\cdot(-1)=0\), so the vectors are orthogonal. But this alone does not say that the matrix with these columns is orthogonal.

Set \(\mathbf{A}=\begin{bmatrix}\mathbf{u}&\mathbf{v}\end{bmatrix}\). The column lengths are \(\|\mathbf{u}\|=\sqrt{2}\) and \(\|\mathbf{v}\|=\sqrt{2}\), not \(1\). Direct multiplication gives

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

So \(\mathbf{A}\) is not an orthogonal matrix, even though its columns are orthogonal vectors. Normalizing each column corrects the issue: let \(\mathbf{U}=\frac{1}{\sqrt{2}}\mathbf{A}\). Then

$$ \mathbf{U}^{\top}\mathbf{U} =\frac{1}{2}\mathbf{A}^{\top}\mathbf{A} =\frac{1}{2}\begin{bmatrix}2&0\\0&2\end{bmatrix} =\mathbf{I}_2. $$

Check: the columns of \(\mathbf{U}\) have squared lengths \(1\) and dot product \(0\), so they are orthonormal, as the product confirms.

A Determinant Check Is Necessary, Not Sufficient

For a real square orthogonal matrix, the determinant must be \(1\) or \(-1\). This is a useful check, but it is not a complete test: many non-orthogonal matrices also have determinant \(1\) or \(-1\).

Theorem: If \(\mathbf{Q}\in\mathbb{R}^{n\times n}\) is orthogonal, then \(\det\mathbf{Q}\in\{1,-1\}\). The converse is false.

Proof. If \(\mathbf{Q}\) is orthogonal, then \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\). Taking determinants and using \(\det(\mathbf{Q}^{\top}\mathbf{Q})=\det(\mathbf{Q}^{\top})\det(\mathbf{Q})\) and \(\det(\mathbf{Q}^{\top})=\det(\mathbf{Q})\), we obtain \((\det\mathbf{Q})^2=\det\mathbf{I}_n=1\). Since \(\det\mathbf{Q}\) is real, this implies \(\det\mathbf{Q}=1\) or \(\det\mathbf{Q}=-1\). To see that the converse fails, consider the matrix \(\mathbf{A}=\begin{bmatrix}2&0\\0&\frac12\end{bmatrix}\). Its determinant is \(2\cdot\frac12=1\), but \(\mathbf{A}^{\top}\mathbf{A}=\begin{bmatrix}4&0\\0&\frac14\end{bmatrix}\ne\mathbf{I}_2\), so it is not orthogonal. \(\square\)

Worked Example: Determinant One Does Not Prove Orthogonality

Test \(\mathbf{A}=\begin{bmatrix}2&0\\0&\frac12\end{bmatrix}\) for orthogonality. Its determinant is

$$ \det\mathbf{A}=2\left(\frac12\right)-0\cdot0=1. $$

A tempting but incorrect conclusion is that \(\mathbf{A}\) is orthogonal because its determinant is \(1\). Instead, test the columns, or multiply by the transpose:

$$ \mathbf{A}^{\top}\mathbf{A} = \begin{bmatrix}2&0\\0&\frac12\end{bmatrix} \begin{bmatrix}2&0\\0&\frac12\end{bmatrix} = \begin{bmatrix}4&0\\0&\frac14\end{bmatrix}. $$

This is not \(\mathbf{I}_2\). The columns are orthogonal to each other, but their lengths are \(2\) and \(\frac12\), so they are not unit vectors. The determinant records an area-scaling quantity; it does not require each column to have length \(1\).

Check: the determinant is indeed \(1\), while the first diagonal entry of \(\mathbf{A}^{\top}\mathbf{A}\) is \(4\ne1\). The two tests give different information, and the matrix fails the orthogonality test.

What Changes for Rectangular Matrices?

If \(\mathbf{Q}\in\mathbb{R}^{m\times n}\), then \(\mathbf{Q}^{\top}\mathbf{Q}\) has size \(n\times n\), while \(\mathbf{Q}\mathbf{Q}^{\top}\) has size \(m\times m\). If the columns are orthonormal, then \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\). It does not follow that \(\mathbf{Q}\mathbf{Q}^{\top}=\mathbf{I}_m\). The two products have different dimensions when \(m\ne n\), and their roles cannot be interchanged.

Worked Example: A Tall Matrix with Orthonormal Columns

Let \(\mathbf{Q}=\begin{bmatrix}1&0\\0&1\\0&0\end{bmatrix}\), a \(3\times2\) matrix. Its columns are \(\begin{bmatrix}1\\0\\0\end{bmatrix}\) and \(\begin{bmatrix}0\\1\\0\end{bmatrix}\), which each have length \(1\) and have dot product \(0\). Directly,

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

However, the product in the opposite order is

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

Thus the columns are orthonormal, but \(\mathbf{Q}\) is rectangular, not an orthogonal matrix. The product \(\mathbf{Q}\mathbf{Q}^{\top}\) is not the identity because the columns do not fill all of \(\mathbb{R}^3\).

Check: the first product is \(2\times2\) and equals \(\mathbf{I}_2\); the second is \(3\times3\) and has a zero in its bottom-right entry. This verifies both the column test and the warning against swapping product order.

The reverse rectangular pattern is also possible: a wide matrix may have orthonormal rows, which is tested by \(\mathbf{Q}\mathbf{Q}^{\top}=\mathbf{I}_m\). For instance, transposing the preceding \(\mathbf{Q}\) gives a \(2\times3\) matrix \(\mathbf{Q}^{\top}\) with orthonormal rows. But it cannot have three orthonormal columns in \(\mathbb{R}^2\). More generally, a \(2\times3\) matrix cannot satisfy \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_3\), because that would give three linearly independent vectors in \(\mathbb{R}^2\). Always check the matrix dimensions before interpreting an identity equation.

A Reliable Diagnostic Routine

When an orthogonality calculation is uncertain, use the object and its dimensions to select the right test. The following sequence keeps the claims separate:

1
Identify the objects.
For two vectors, compute their dot product. For a list of vectors, check pairwise dot products and each vector's length. For a matrix, identify whether it is square or rectangular.
2
Use the matching matrix product.
For an \(m\times n\) matrix, \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) tests whether its columns are orthonormal. If \(m=n\), this also tests whether it is an orthogonal matrix.
3
Treat determinant as a one-way check.
If a square real matrix is orthogonal, its determinant must be \(1\) or \(-1\). A determinant of \(1\) or \(-1\) does not establish orthogonality, so calculate \(\mathbf{Q}^{\top}\mathbf{Q}\) or check its columns.
4
Check the dimensions and multiply back.
Confirm that each product is defined and has the stated size. Compare every entry with the identity matrix of that size; do not infer that \(\mathbf{Q}\mathbf{Q}^{\top}=\mathbf{I}\) merely from \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\).

Common Errors and Their Corrections

Error: “The vectors are orthogonal, so the matrix is orthogonal.” Orthogonality between distinct columns only makes off-diagonal entries of \(\mathbf{Q}^{\top}\mathbf{Q}\) zero. The diagonal entries are their squared lengths, and each must also equal \(1\). In the first example, the off-diagonal entries are zero but the diagonal entries are \(2\).

Error: “The determinant is \(\pm1\), so the matrix is orthogonal.” This reverses a one-way implication. Orthogonality forces determinant \(\pm1\); determinant \(\pm1\) does not force orthogonality. The matrix \(\begin{bmatrix}2&0\\0&\frac12\end{bmatrix}\) is a concrete counterexample.

Error: “If \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\), then \(\mathbf{Q}\mathbf{Q}^{\top}=\mathbf{I}\).” For rectangular matrices these products can have different sizes. In the \(3\times2\) example, \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_2\), while \(\mathbf{Q}\mathbf{Q}^{\top}\ne\mathbf{I}_3\). A quick correction is to write down the dimensions of both products before making an identity claim.

What is being tested?Correct checkWhat the check establishes
Two vectors \(\mathbf{u},\mathbf{v}\)\(\mathbf{u}\cdot\mathbf{v}=0\)The vectors are orthogonal
Columns of \(\mathbf{Q}\in\mathbb{R}^{m\times n}\)\(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\)The columns are orthonormal
Square \(\mathbf{Q}\in\mathbb{R}^{n\times n}\)\(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\)\(\mathbf{Q}\) is an orthogonal matrix
Determinant of a square matrix\(\det\mathbf{Q}=\pm1\)A necessary condition for orthogonality, not a sufficient one

The central habit is to state exactly what is orthogonal: a pair of vectors, a list of unit vectors that are pairwise orthogonal, or a square matrix with orthonormal columns. Once that distinction is made, the appropriate dot product or matrix product follows, and the dimensions show which conclusions are valid.

Check Your Understanding

For each question, identify the relevant object and show enough calculation to justify the conclusion.

  1. Let \(\mathbf{u}=\begin{bmatrix}2\\0\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}0\\1\end{bmatrix}\). Are they orthogonal? Does the matrix with these columns qualify as an orthogonal matrix? Explain.
  2. Give a square matrix with determinant \(-1\) that is not orthogonal, and verify both claims.
  3. For a \(4\times2\) matrix \(\mathbf{Q}\), what does \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_2\) tell you about its columns? What size is \(\mathbf{Q}\mathbf{Q}^{\top}\)?
  4. Why can a \(2\times3\) matrix not have three orthonormal columns? State the independence fact that applies.
  5. Explain why orthogonal columns alone do not guarantee that \(\mathbf{Q}^{\top}\mathbf{Q}\) is an identity matrix.

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