# Program for creating orthogonal matrices

In linear algebra, an orthogonal matrix is an n x n matrix for which its transpose is also its inverse; when mutiplied by its own transpose, an orthogonal matrix yields the identity matrix. The identity matrix basically amounts to the higher-dimensional equivalent of the number one.

Now, every orthogonal matrix I have come up is symmetric; it equals its own transpose.  (It might be possible for a non-symmetric matrix to be orthogonal, I don’t know.) But this means that the orthogonal matrix multiplied by its transpose is the same as the orthogonal matrix multiplied by itself. And since when we multiply any of these orthogonal matrices by their transposes we get the identity matrix, what we really have in a symmetric orthogonal matrix is a higher-dimensional square root of the number one.

In one dimension, a number one has only one square root (√1 = 1). But in higher dimensions, there are multiple possible square roots. I wrote a program in Excel that lets me find symmetric orthogonal matrices in 3×3, 4×4, and 5×5 systems. You are welcome to try it out, it is here, and it includes the notes and calculations I made along the way. You will see I also tried plotting out some of these matrices, just to see what they looked like physically.

(The program is automatic; just fill in numbers in the fields in yellow, heeding any instructions in the blue-green fields. The rest takes care of itself.)

I have yet to find a practical use for any of this, but there is something elegant about a matrix that multiplies away into identity. If you know what orthogonal matrices are good for, or if you have any further thoughts on this, then please post a comment.

## 3 comments to Program for creating orthogonal matrices

1. Rahul Dhal says:

I really do not know where I can “practically” use an orthogonal matrix. But in my work there was a need to test a certain theory I on symmetric as well as stochastic matrices (something that comes for a Markov chain defined on a un-directed graph), in which two components (an only two) of any one of the eigenvectors (other than the dominant one) to be equal. This meant to test the theory, t needed to generate symmetric matrices, with a very specific structure on eigenvector and eigenvalues.This in turn meant that I need to generate orthogonal matrices with two of the columns already specified sort of. And I need to generate a large number of it. Now I really couldn’t find a way to do that from randomly generated matrices. So I think I would use your “orthogonal matric creator”, but that is no where close to being a “practical use” .

And yes!!! non-symmetric matrices can be orthogonal. Example
V =

1 1 -1
1 1 1
1 -2 0
is orthogonal. Please try (inv(V) – V’). The difference is in order of 10E-15, which is “practically” 0. (Note:- Normalize the column to unit length before testing)

2. Rahul Dhal says:

But where do I find your program?

3. Alamanach says:

Rahul,

I originally had the program stored elsewhere because WordPress would not allow me to upload Excel documents. I have emailed it to you. If anyone else needs it, just leave a comment, and I can send it to you right away.