# Orthonormal and unitary matrices

## Energy preserving operators, generalized rotations

In which I think about parameterisations and implementations of finite dimensional energy-preserving operators, a.k.a. matrices. A particular nook in the linear feedback process library, closely related to stability in linear dynamical systems, since every orthonormal matrix is the forward operator of an energy-preserving system, which is an edge case for certain natural types of stability. Also important in random low-dimensional projections. Uses include maintaining stable gradients in recurrent neural networks and efficient normalising flows.

Also, parameterising stable Multi-Input-Multi-Output (MIMO) delay networks in signal processing.

There is some terminological work.

Some writers refer to orthogonal matrices (but I prefer that to mean matrices where the columns are not all length 1), and some refer to unitary matrices, which seems to imply the matrix is over the complex field instead of the reals but is basically the same from my perspective.

Finding an orthonormal matrix is equivalent to choosing a finite orthonormal basis, so any way we can parameterise such a basis gives us an orthonormal matrix.

We also might want to consider the implied manifolds of these object, the Stiefel manifold. Formally, the Stiefel manifold $$V_{k, m}$$ is the space of $$k$$ frames in the $$m$$ -dimensional real Euclidean space $$R^{m},$$ represented by the set of $$m \times k$$ matrices $$X$$ such that $$X^{\prime} X=I_{k},$$ where $$I_{k}$$ is the $$k \times k$$ identity matrix. Usually my purposes are served here by $$k=m$$. There are some interesting cases in low dimensional projections served by $$k<m$$ including $$k=1.$$

## Parametrising

### Take the QR decomposition

HT Russell Tsuchida for pointing out that the QR decomposition by construction gives you an orthonormal matrix for any square matrix. The construction by Householder reflections is, Wikipedia reckons, $$\mathcal{O}(n^3)$$ multiplications for an $$n\times n$$ matrix.

I wonder what the distribution of such matrices is for some, say, matrix with independent standard Gaussian entries? Nick Higham has the answer, in his compact introduction to random orthonormal matrices. A uniform, rotation-invariant distribution is given by the Haar measure over the group of orthogonal matrices. He also gives the construction for drawing them by random Householder reflections derived from random standard normal vectors.

### Iterative normalising

Have a nearly orthonormal matrix? gives us a contraction which gets you closer to an orthonormal matrix:

$\mathbf{Q}^{(k+1)}=\mathbf{Q}^{(k)}\left(\mathbf{I}+\frac{1}{2}\left(\mathbf{I}-\mathbf{Q}^{(k) \top} \mathbf{Q}^{(k)}\right)\right)$ which reputedly converges if $$\left\|\mathbf{Q}^{(0) \top} \mathbf{Q}^{(0)}-\mathbf{I}\right\|_{2}<1.$$ They attribute this to and , wherein it is derived from the Newton iteration for solving $$Q^{-1}-$$ Here the iterations are clearly $$\mathcal{O}(n^2).$$ An $$\mathcal{O}(n)$$ option would be nice.

### Householder reflections

We can apply successive reflections about hyperplanes, the so called Householder reflections, to an identity matrix to construct a new one.

$H(\mathbf{z})=\mathbf{z}-\frac{\mathbf{v} \mathbf{v}^{T}}{\|\mathbf{v}\|^{2}} \mathbf{z}$ 🏗

### Givens rotation One obvious method for constructing unitary matrices is composing Givens rotations, which are atomic rotations about 2 axes. I am not sure of the computational complexity of it, but I suspect that all the trigonometry makes it practically expensive. 🏗

## Cayley map

the Cayley map maps the skew-symmetric matrices to the orthogonal matrices of positive determinant, and parameterizing skew-symmetric matrices is easy; just take the upper triangular componenet of some matrix and flip /negate it. NB this still requires a matrix inversion in general, AFAICS.

### Parametric sub families

Citing MATLAB, Nick Higham gives the following two parametric families of orthonormal matrices. These are clearly far from covering the whole space of orthonormal matrices.

$q_{ij} = \displaystyle\frac{2}{\sqrt{2n+1}}\sin \left(\displaystyle\frac{2ij\pi}{2n+1}\right)$

$q_{ij} = \sqrt{\displaystyle\frac{2}{n}}\cos \left(\displaystyle\frac{(i-1/2)(j-1/2)\pi}{n} \right)$

Another one: the matrix exponential of a skew-symmetric matrix is orthonormal. If $$A=-A^{T}$$ then $\left(e^{A}\right)^{-1}=\mathrm{e}^{-A}=\mathrm{e}^{A^{T}}=\left(\mathrm{e}^{A}\right)^{T}.$

## Structured

Orthogonal convolutions?

## Higher rank

Energy preserving maps.

## Random

See random rotations.

### No comments yet. Why not leave one?

GitHub-flavored Markdown & a sane subset of HTML is supported.