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:

The transpose of is

To check if is orthogonal, we need to see whether , where is the identity matrix

Using matrix multiplication, we would find that

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 orthogonal?

### Answer

For the matrix to be orthogonal, it must be the case that , where is the identity matrix. Given that we can multiply these two matrices together to give

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 orthogonal?

### Answer

If is orthogonal, then , where is the identity matrix, sometimes referred to as the unit matrix. To check for orthogonality, we can find the transpose matrix

Then, we perform the matrix multiplication

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 .

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 . Applying both of these results to the above equation gives

We, therefore, have that , which shows that , as required.

We now know that, for a square matrix to be orthogonal, it is necessary for that matrix to have a determinant of . However, that is not in itself a sufficient condition for orthogonality. As an example, suppose we take the matrix

Since is a matrix, we can use Sarrus’ rule to calculate the determinant as follows:

The determinant of is equal to 1; therefore, it is possible that the matrix is orthogonal. We test this by constructing the transpose matrix and then performing the calculation

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 , 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 Then the dot product, also known as the scalar product, of these two vectors is defined by the formula

### Theorem: Orthogonal Matrices and Relationships between Columns

Suppose that we have the square matrix and that the columns of this matrix are labelled as

Then, for to be orthogonal, it must be the case that for all and that 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 , 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:

### Answer

For a square matrix to be orthogonal, it must have a determinant equal to . For the matrix , we can use the well-known formula for the determinant of a matrix:

Applying this result to the given matrix , we have

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

For the matrix to be orthogonal, the above column vectors must have some special properties. First, it must be the case that for . It must also be the case that when . In other words, we must check that , , and .

We first highlight the entries of each column vector as shown:

Then we have and as required. There is now only one condition remaining to check, so we calculate

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 is orthogonal, find the values of , , , and .

### Answer

We first label the above matrix as and write the three column vectors

If is orthogonal, then it must be the case that for all and that for , where the symbol represents the dot product between the two vectors. In other words, we must have , , and . Additionally, we require that , , and .

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 and to find the parameter , by using the relationship . Writing this out in full, we have

Given that , we conclude that . This means that we now have the three column vectors

The parameter can be found in a similar manner by using and . We take the dot product

We require that , which implies that . This value can be replaced in the column vectors, giving the updated versions

If we were to now use the column vectors and and take the dot product between them, then we will involve the parameters and . We find

We must have , which means that

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 . By taking the dot product of with itself, we find

Given that , we have , and hence . By using equation (1), we can find by rearranging to give

As an additional check that is the correct value, we could verify that 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

Accordingly, there are two possible forms for the matrix to be orthogonal, which are summarized by the single expression

As a check that this matrix is definitely an orthogonal matrix, we could check that , where is the 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 . 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 . 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 .
- Suppose that represent the columns of a square matrix . If for all and for all , then the matrix is orthogonal.