Explainer: Orthogonal Matrices

In this explainer, we will learn how to determine whether a matrix is orthogonal and how to find its inverse if it is.

In linear algebra, there are many special types of matrices that are interesting either because of the geometric transformations that they represent, or because of the convenient algebraic properties that they hold. Very often, these special matrices are square matrices and have a definition that is in some way related to the determinant or the transpose. For example, symmetric matrices are square matrices which are equal to their own transpose, and skew-symmetric matrices are equal to the their own transpose after a sign change in every entry. These types of special matrices have a plethora of applications and are full of a range of algebraic properties which make them very attractive in a theoretical sense. For this explainer, we will be interested in orthogonal matrices, which have a very particular and restrictive definition. Orthogonal matrices are defined by two key concepts in linear algebra: the transpose of a matrix and the inverse of a matrix. Orthogonal matrices also have a deceptively simple definition, which gives a helpful starting point for understanding their general algebraic properties.

Definition: Orthogonal Matrix

For a square matrix ๐ด to be orthogonal, it must be the case that ๐ด๐ด=๐ผ,๏Œณ๏Š where ๐ด๏Œณ is the matrix transpose of ๐ด and where ๐ผ๏Š is the ๐‘›ร—๐‘› identity matrix.

If we were to take a random square matrix, then it is very unlikely that this matrix would also be orthogonal. To demonstrate this, take the following square matrix where the entries are random integers: ๐ด=๏˜1โˆ’12โˆ’43โˆ’136โˆ’613๏ค.

The transpose of ๐ด is ๐ด=๏˜1โˆ’46โˆ’13โˆ’62โˆ’1313๏ค.๏Œณ

To check if ๐ด is orthogonal, we need to see whether ๐ด๐ด=๐ผ๏Œณ๏Šฉ, where ๐ผ๏Šฉ is the 3ร—3 identity matrix ๐ผ=๏˜100010001๏ค.๏Šฉ

Using matrix multiplication, we would find that ๐ด๐ด=๏˜1โˆ’12โˆ’43โˆ’136โˆ’613๏ค๏˜1โˆ’46โˆ’13โˆ’62โˆ’1313๏ค=๏˜6โˆ’3338โˆ’33194โˆ’21138โˆ’211241๏ค.๏Œณ

Clearly, it is absolutely not the case that ๐ด๐ด=๐ผ๏Œณ๏Šฉ, and therefore ๐ด is not an orthogonal matrix.

At this stage, it might become apparent that it is unlikely that a random square matrix would be orthogonal. As we will see later, there are very strong conditions which are necessary for a matrix to be orthogonal, and these can, to some extent, be thought of algebraically. We will first consider two examples as a way of practicing our ability to determine whether or not a given matrix is orthogonal.

Example 1: Determining Whether a 3 ร— 3 Matrix is Orthogonal

Is the matrix ๐ด=13๏˜1โˆ’222โˆ’1โˆ’2221๏ค orthogonal?

Answer

For the matrix ๐ด to be orthogonal, it must be the case that ๐ด๐ด=๐ผ๏Œณ๏Šฉ, where ๐ผ๏Šฉ is the 3ร—3 identity matrix. Given that ๐ด=13๏˜122โˆ’2โˆ’122โˆ’21๏ค,๏Œณ we can multiply these two matrices together to give ๐ด๐ด=13ร—13๏˜122โˆ’2โˆ’122โˆ’21๏ค๏˜1โˆ’222โˆ’1โˆ’2221๏ค=19๏˜900090009๏ค=๏˜100010001๏ค=๐ผ.๏Œณ๏Šฉ

Since we have found that ๐ด๐ด=๐ผ๏Œณ๏Šฉ, it is the case that ๐ด is orthogonal.

Example 2: Determining Whether a 3 ร— 3 Matrix is Orthogonal

Is the matrix ๐ด=๏˜122212221๏ค orthogonal?

Answer

If ๐ด is orthogonal, then ๐ด๐ด=๐ผ๏Œณ๏Šฉ, where ๐ผ๏Šฉ is the 3ร—3 identity matrix, sometimes referred to as the 3ร—3 unit matrix. To check for orthogonality, we can find the transpose matrix ๐ด=๏˜122212221๏ค.๏Œณ

Then, we perform the matrix multiplication ๐ด๐ด=๏˜122212221๏ค๏˜122212221๏ค=๏˜988898889๏ค.๏Œณ

Given that ๐ด๐ดโ‰ ๐ผ๏Œณ๏Šฉ, the matrix ๐ด is not orthogonal.

Provided that we have a good understanding of matrix multiplication, it is straightforward to verify whether a given matrix is orthogonal, although we will have to perform many calculations to complete the matrix multiplication for matrices with larger orders. We might then reasonably ask if there are any other methods for determining whether or not a matrix is orthogonal. Since any orthogonal matrix must be a square matrix, we might expect that we can use the determinant to help us in this regard, given that the determinant is only defined for square matrices. The determinant is a concept that has a range of very helpful properties, several of which contribute to the proof of the following theorem.

Theorem: Determinant of an Orthogonal Matrix

Supposing that ๐ด is an orthogonal matrix, then it must be the case that the determinant of ๐ด can take only two values. Specifically, it must be the case that |๐ด|=ยฑ1.

We recall the definition of an orthogonal matrix, which states that for ๐ด to be orthogonal, it must be that ๐ด๐ด=๐ผ.๏Œณ๏Š

By taking determinants of both sides, we obtain |๐ด๐ด|=|๐ผ|.๏Œณ๏Š

The determinant is multiplicative over matrix multiplication, which means that |๐ต๐ถ|=|๐ต||๐ถ| for any two square matrices of equal dimension, ๐ต and ๐ถ. The above equation then becomes |๐ด||๐ด|=|๐ผ|.๏Œณ๏Š

Two standard results from linear algebra are that the determinant of a transpose matrix is equal to the determinant of the original matrix; in other words, |๐ด|=|๐ด|๏Œณ. It is also true that the determinant of any identity matrix is equal to 1, meaning that |๐ผ|=1๏Š. Applying both of these results to the above equation gives |๐ด||๐ด|=1.

We, therefore, have that |๐ด|=1๏Šจ, which shows that det(๐ด)=ยฑ1, as required.

We now know that, for a square matrix ๐ด to be orthogonal, it is necessary for that matrix to have a determinant of ยฑ1. However, that is not in itself a sufficient condition for orthogonality. As an example, suppose we take the matrix ๐ด=||||1โˆ’1โˆ’1โˆ’3262โˆ’2โˆ’3||||.

Since ๐ด is a 3ร—3 matrix, we can use Sarrusโ€™ rule to calculate the determinant as follows: |๐ด|=๐‘Ž|๐ด|โˆ’๐‘Ž|๐ด|+๐‘Ž|๐ด|=1ร—||26โˆ’2โˆ’3||โˆ’(โˆ’1)ร—||โˆ’362โˆ’3||+(โˆ’1)ร—||โˆ’322โˆ’2||=1ร—6โˆ’(โˆ’1)ร—(โˆ’3)+(โˆ’1)ร—(2)=1.๏Šง๏Šง๏Šง๏Šง๏Šง๏Šจ๏Šง๏Šจ๏Šง๏Šฉ๏Šง๏Šฉ

The determinant of ๐ด is equal to 1; therefore, it is possible that the matrix is orthogonal. We test this by constructing the transpose matrix ๐ด=๏˜1โˆ’32โˆ’12โˆ’2โˆ’16โˆ’3๏ค๏Œณ and then performing the calculation ๐ด๐ด=๏˜1โˆ’1โˆ’1โˆ’3262โˆ’2โˆ’3๏ค๏˜1โˆ’32โˆ’12โˆ’2โˆ’16โˆ’3๏ค=๏˜3โˆ’117โˆ’1149โˆ’287โˆ’2817๏ค.๏Œณ

Given that ๐ด๐ดโ‰ ๐ผ๏Œณ๏Šฉ, the matrix is not orthogonal despite the fact that it has a determinant of 1.

The above theorem is helpful as it can tell us immediately whether it is possible for a square matrix to be orthogonal. Whilst the theorem does give us a necessary condition for orthogonality, it is not in itself a sufficient condition for orthogonality, as we saw in the previous example. Practically, though, it is generally wise to calculate the determinant of a square matrix before checking whether it is orthogonal. If a square matrix has a determinant of ยฑ1, then it is possible that it will be an orthogonal matrix, although determining this with certainty will require the following definition and theorem.

Definition: Dot Product of Two Vectors

Consider the two vectors uv=[๐‘ข๐‘ขโ‹ฎ๐‘ข],=[๐‘ฃ๐‘ฃโ‹ฎ๐‘ฃ].๏Šง๏Šจ๏Š๏Šง๏Šจ๏Š Then the dot product, also known as the scalar product, of these two vectors is defined by the formula uvโ€ข=๏„š๐‘ขร—๐‘ฃ=(๐‘ขร—๐‘ฃ)+(๐‘ขร—๐‘ฃ)+โ‹ฏ+(๐‘ขร—๐‘ฃ).๏Š๏‡๏Šฒ๏Šง๏‡๏‡๏Šง๏Šง๏Šจ๏Šจ๏Š๏Š

Theorem: Orthogonal Matrices and Relationships between Columns

Suppose that we have the square matrix ๐ด=โŽกโŽขโŽขโŽฃ๐‘Ž๐‘Žโ‹ฏ๐‘Ž๐‘Ž๐‘Žโ‹ฏ๐‘Žโ‹ฎโ‹ฎโ‹ฑโ‹ฎ๐‘Ž๐‘Žโ€ฆ๐‘ŽโŽคโŽฅโŽฅโŽฆ๏Šง๏Šง๏Šง๏Šจ๏Šง๏Š๏Šจ๏Šง๏Šจ๏Šจ๏Šจ๏Š๏Š๏Šง๏Š๏Šจ๏Š๏Š and that the columns of this matrix are labelled as ccc๏Šง๏Šง๏Šง๏Šจ๏Šง๏Š๏Šง๏Šจ๏Šง๏Šจ๏Šจ๏Šจ๏Š๏Šจ๏Š๏Šง๏Š๏Šจ๏Š๏Š๏Š=[๐‘Ž๐‘Žโ‹ฎ๐‘Ž],=[๐‘Ž๐‘Žโ‹ฎ๐‘Ž],โ€ฆ=[๐‘Ž๐‘Žโ‹ฎ๐‘Ž].

Then, for ๐ด to be orthogonal, it must be the case that cc๏ƒ๏ƒโ€ข=1 for all ๐‘– and that cc๏ƒ๏…โ€ข=0 for any ๐‘–โ‰ ๐‘—, where โ€ข indicates the dot product. If the columns of ๐ด have this property, then they are called an orthonormal set.

This gives us a test by which we can diagnose whether or not a matrix is orthogonal. In the following example, we will apply the test described in the theorem above; however, we will first check whether the determinant is equal to ยฑ1, as otherwise it will not be possible for the matrix to be orthogonal. Although it is not strictly necessary to perform this step, neglecting to do so might mean a lot of wasted effort if the matrix is not actually orthogonal.

Example 3: Determining Whether a 2 ร— 2 Matrix is Orthogonal by Using the Dot Product

Determine whether the following matrix is orthogonal: ๐ด=โŽกโŽขโŽขโŽขโŽฃโˆš32โˆ’1212โˆš32โŽคโŽฅโŽฅโŽฅโŽฆ.

Answer

For a square matrix to be orthogonal, it must have a determinant equal to ยฑ1. For the matrix ๐ด, we can use the well-known formula for the determinant of a 2ร—2 matrix: ๏”๐‘Ž๐‘๐‘๐‘‘๏ =๐‘Ž๐‘‘โˆ’๐‘๐‘.

Applying this result to the given matrix ๐ด, we have |๐ด|=||||||โˆš32โˆ’1212โˆš32||||||=โˆš32ร—โˆš32โˆ’๏€ผโˆ’12๏ˆร—12=1.

It is possible that this matrix is orthogonal, but to know this for certain we will have to compare the columns. We can separately write out the two columns of the matrix as the vectors cc๏Šง๏Šจ=โŽกโŽขโŽขโŽขโŽฃโˆš3212โŽคโŽฅโŽฅโŽฅโŽฆ,=โŽกโŽขโŽขโŽขโŽฃโˆ’12โˆš32โŽคโŽฅโŽฅโŽฅโŽฆ.

For the matrix ๐ด to be orthogonal, the above column vectors must have some special properties. First, it must be the case that cc๏ƒ๏ƒโ€ข=1 for ๐‘–=1,2. It must also be the case that cc๏ƒ๏…โ€ข=0 when ๐‘–โ‰ ๐‘—. In other words, we must check that cc๏Šง๏Šงโ€ข=1, cc๏Šจ๏Šจโ€ข=1, and cc๏Šง๏Šจโ€ข=0.

We first highlight the entries of each column vector as shown: cc๏Šง๏Šจ=โŽกโŽขโŽขโŽขโŽฃโˆš3212โŽคโŽฅโŽฅโŽฅโŽฆ,=โŽกโŽขโŽขโŽขโŽฃโˆ’12โˆš32โŽคโŽฅโŽฅโŽฅโŽฆ.

Then we have cc๏Šง๏Šงโ€ข=๏€ฟโˆš32ร—โˆš32๏‹+๏€ผ12ร—12๏ˆ=1, and cc๏Šจ๏Šจโ€ข=๏€ผ๏€ผโˆ’12๏ˆร—๏€ผโˆ’12๏ˆ๏ˆ+๏€ฟโˆš32ร—โˆš32๏‹=1, as required. There is now only one condition remaining to check, so we calculate cc๏Šง๏Šจโ€ข=๏€ฟโˆš32ร—๏€ผโˆ’12๏ˆ๏‹+๏€ฟ12ร—โˆš32๏‹=0.

The three stated conditions have been satisfied, and therefore ๐ด is an orthogonal matrix, which we could check by seeing that it meets the definition and obeys the property ๐ด๐ด=๐ผ๏Œณ๏Šจ.

In the above example, we have applied a theorem to check whether the given matrix was orthogonal. Another way of interpreting this theorem would be that, given a partially populated matrix, we now know how to populate the blank entries in a way that forces the matrix to be orthogonal. Depending on the values of the entries which have already been populated, it may not be possible to populate the blank entries in a way which forces the matrix to be orthogonal, although in the following example the known entries have been chosen in a way that will still allow this.

Example 4: Determining Whether a 3 ร— 3 Matrix Is Orthogonal by Using the Dot Product

Given that the matrix โŽกโŽขโŽขโŽขโŽขโŽฃ23โˆš22โˆš2623๐‘Ž๐‘๐‘0๐‘‘โŽคโŽฅโŽฅโŽฅโŽฅโŽฆ is orthogonal, find the values of ๐‘Ž, ๐‘, ๐‘, and ๐‘‘.

Answer

We first label the above matrix as ๐ด and write the three column vectors ccc๏Šง๏Šจ๏Šฉ=๏”2323๐‘๏ ,=๏•โˆš22๐‘Ž0๏ก=๏•โˆš26๐‘๐‘‘๏ก.

If ๐ด is orthogonal, then it must be the case that cc๏ƒ๏ƒโ€ข=1 for all ๐‘–=1,2,3 and that cc๏ƒ๏…โ€ข=0 for ๐‘–โ‰ ๐‘—, where the โ€ข symbol represents the dot product between the two vectors. In other words, we must have cc๏Šง๏Šงโ€ข=1, cc๏Šจ๏Šจโ€ข=1, and cc๏Šฉ๏Šฉโ€ข=1. Additionally, we require that cc๏Šง๏Šจโ€ข=0, cc๏Šจ๏Šฉโ€ข=0, and cc๏Šง๏Šฉโ€ข=0.

These relationships must all hold since ๐ด is orthogonal, so we can use any of these relationships to help us determine the unknown variables ๐‘Ž, ๐‘, ๐‘, and ๐‘‘. We will begin by using c๏Šง and c๏Šจ to find the parameter ๐‘Ž, by using the relationship cc๏Šง๏Šจโ€ข=0. Writing this out in full, we have cc๏Šง๏Šจโ€ข=๏€ฟ23ร—โˆš22๏‹+๏€ผ23ร—๐‘Ž๏ˆ+(๐‘ร—0)=โˆš23+23๐‘Ž.

Given that cc๏Šง๏Šจโ€ข=0, we conclude that ๐‘Ž=โˆ’โˆš22. This means that we now have the three column vectors ccc๏Šง๏Šจ๏Šฉ=๏”2323๐‘๏ ,=๏•โˆš22โˆ’โˆš220๏ก,=๏•โˆš26๐‘๐‘‘๏ก.

The parameter ๐‘ can be found in a similar manner by using c๏Šจ and c๏Šฉ. We take the dot product cc๏Šจ๏Šฉโ€ข=๏€ฟโˆš22ร—โˆš26๏‹+๏€ฟ๏€ฟโˆ’โˆš22๏‹ร—๐‘๏‹+(0ร—๐‘‘)=16โˆ’โˆš22๐‘.

We require that cc๏Šจ๏Šฉโ€ข=0, which implies that ๐‘=โˆš26. This value can be replaced in the column vectors, giving the updated versions ccc๏Šง๏Šจ๏Šฉ=๏”2323๐‘๏ ,=๏•โˆš22โˆ’โˆš220๏ก,=๏•โˆš26โˆš26๐‘‘๏ก.

If we were to now use the column vectors c๏Šง and c๏Šฉ and take the dot product between them, then we will involve the parameters ๐‘ and ๐‘‘. We find cc๏Šง๏Šฉโ€ข=๏€ฟ23ร—โˆš26๏‹+๏€ฟ23ร—โˆš26๏‹+(๐‘ร—๐‘‘)=2โˆš29+๐‘๐‘‘.

We must have cc๏Šง๏Šฉโ€ข=0, which means that

๐‘๐‘‘=โˆ’2โˆš29.(1)

This has not quite solved the problem yet, as it has only expressed the parameters ๐‘ and ๐‘‘ in a way that they are multiplied together. However, this does not mean that the result cannot be useful to us. We can already deduce that ๐‘ and ๐‘‘ must have opposite signs, which we will need to remember when it comes to stating the final result. We can also use the expressions that we derived earlier which involved taking the dot product of a column vector with itself. For example, to find ๐‘, we can now use the restriction cc๏Šง๏Šงโ€ข=1. By taking the dot product of c๏Šง with itself, we find cc๏Šง๏Šง๏Šจโ€ข=๏€ผ23ร—23๏ˆ+๏€ผ23ร—23๏ˆ+(๐‘ร—๐‘)=89+๐‘.

Given that cc๏Šง๏Šงโ€ข=1, we have c๏Šจ=19, and hence ๐‘=ยฑ13. By using equation (1), we can find ๐‘‘ by rearranging to give ๐‘‘=โˆ’1๐‘ร—2โˆš29=โˆ’(ยฑ3)ร—2โˆš29=โˆ“2โˆš23.

As an additional check that ๐‘‘ is the correct value, we could verify that cc๏Šฉ๏Šฉโ€ข=1 with either possible value of ๐‘‘. We reasoned earlier that ๐‘ and ๐‘‘ have opposite signs, so we can conclude that there are two possible values for ๐‘ and ๐‘‘. Therefore, there are two possible versions of the correct column vectors ccc๏Šง๏Šจ๏Šฉ=๏”2323ยฑ13๏ ,=๏•โˆš22โˆ’โˆš220๏ก,=๏•โˆš26โˆš26โˆ“2โˆš23๏ก.

Accordingly, there are two possible forms for the matrix ๐ด to be orthogonal, which are summarized by the single expression ๐ด=โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ23โˆš22โˆš2623โˆ’โˆš22โˆš26ยฑ130โˆ“2โˆš23โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ.

As a check that this matrix is definitely an orthogonal matrix, we could check that ๐ด๐ด=๐ผ๏Œณ๏Šฉ, where ๐ผ๏Šฉ is the 3ร—3 identity matrix.

We now have a total of three tests to decide whether or not a matrix is orthogonal. For a matrix ๐ด, we can first check whether orthogonality is even possible by seeing if |๐ด|=ยฑ1. If orthogonality is possible, then we can see whether ๐ด๐ด=๐ผ๏Œณ๏Š, which only requires one instance of matrix multiplication. Separate from these two methods, we can also compare the columns of ๐ด and see whether they form an orthonormal set. Whilst these tests are interesting, they are not overtly helpful if we are interested in constructing an orthogonal matrix. Unsurprisingly, there is an algorithm for creating an orthogonal matrix from a set of starting vectors, which is referred to as the Gramโ€“Schmidt algorithm. This algorithm is generally considered to be one of the most useful algorithms in all of linear algebra, as orthonormal sets are the foundation of many modern fields such as computer visualization and quantum field theory.

Orthogonal matrices are also considered to be especially important because of their relationship to reflections and rotations in geometry. They also have the highly convenient property that their transpose is equal to their own inverse, which can be easily deduced from the definition. Suppose we assume that ๐ด is an orthogonal square matrix, which means that ๐ด๐ด=๐ผ.๏Œณ๏Š

Since ๐ด is orthogonal, we know that the determinant is equal to ยฑ1. Given that the determinant is nonzero, this means that ๐ด is invertible, and hence ๐ด๏Šฑ๏Šง exists. If we now multiply the above equation on the left-hand side by ๐ด๏Šฑ๏Šง, we find ๐ด๏€น๐ด๐ด๏…=๐ด๐ผ.๏Šฑ๏Šง๏Œณ๏Šฑ๏Šง๏Š

We know that matrix multiplication is associative, which means that ๐ต(๐ถ๐ท)=(๐ต๐ถ)๐ท for any matrices ๐ต, ๐ถ, and ๐ท which have compatible orders. This result means that we may write the above equation as ๏€น๐ด๐ด๏…๐ด=๐ด๐ผ.๏Šฑ๏Šง๏Œณ๏Šฑ๏Šง๏Š

By definition, we have ๐ด๐ด=๐ผ๏Šฑ๏Šง๏Š, where ๐ผ๏Š is the ๐‘›ร—๐‘› identity matrix. This gives ๐ผ๐ด=๐ด๐ผ.๏Š๏Œณ๏Šฑ๏Šง๏Š

The final result we need is the key property of the identity matrix that ๐ต๐ผ=๐ผ๐ต=๐ต๏Š๏Š whenever ๐ต is a matrix with suitable order. The above result, then, simplifies to the final form ๐ด=๐ด.๏Œณ๏Šฑ๏Šง

This is a key, defining feature of orthogonal matrices. Normally we would expect that the transpose of a matrix ๐ด๏Œณ would be much easier to calculate than the multiplicative inverse ๐ด๏Šฑ๏Šง, which is typically a long-winded and error-prone process. But for orthogonal matrices the transpose is actually equal to the multiplicative inverse, which is a blessing should we ever wish to make use of the inverse matrix (as we most frequently do).

Key Points

  • A square matrix ๐ด is orthogonal if ๐ด๐ด=๐ผ๏Œณ๏Š, where ๐ผ๏Š is the ๐‘›ร—๐‘› identity matrix.
  • For a matrix ๐ด to be orthogonal, it must be the case that |๐ด|=ยฑ1.
  • Suppose that ccc๏Šง๏Šจ๏Š,,โ€ฆ, represent the columns of a square matrix ๐ด. If cc๏ƒ๏ƒโ€ข=1 for all ๐‘–=1,2,โ€ฆ,๐‘› and cc๏ƒ๏…โ€ข=0 for all ๐‘–โ‰ ๐‘—, then the matrix ๐ด is orthogonal.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.