User:Kai Neergård/sandbox

The concept of angles between lines in the plane and between pairs of two lines, two planes or a line and a plane in space can be generalised to arbitrary dimension. This generalisation was first discussed by Jordan. For any pair of flats in a Euclidean space of arbitrary dimension one can define a set of mutual angles which are invariant under isometric transformation of the Euclidean space. If the flats do not intersect, their shortest distance is an one more invariant. These angles are called variably canonical and principal in the literature. The concept of angles can be generalised to pairs of flats in a finite-dimensional inner product space over the complex numbers.

Jordan's definition
Let $$F$$ and $$G$$ be flats of dimensions $$k$$ and $$l$$ in the $$n$$-dimensional Euclidean space $$E^n$$. By definition, a translation of $$F$$ or $$G $$ does not alter their mutual angles. If $$F$$ and $$G$$ do not intersect, they will do so upon any translation of $$G$$ which maps some point in $$G$$ to some point in $$F.$$ It can therefore be assumed without loss of generality that $$F$$ and $$G$$ intersect.

Jordan shows that Cartesian coordinates $$x_1,\dots,x_\rho,$$ $$y_1,\dots,y_\sigma,$$ $$z_1,\dots,z_\tau,$$ $$u_1,\dots,u_\upsilon,$$ $$v_1,\dots,x_\alpha,$$ $$w_1,\dots,w_\alpha$$ in $$E^n$$ can then be defined such that $$F$$ and $$G$$ are described, respectively, by the sets of equations

$$x_1=0,\dots,x_\rho=0,$$

$$u_1=0,\dots,u_\upsilon=0,$$

$$v_1=0,\dots,v_\alpha=0$$

and

$$x_1=0,\dots,x_\rho=0,$$

$$z_1=0,\dots,z_\tau=0,$$

$$v_1\cos\theta_1+w_1\sin\theta_1=0,\dots,v_\alpha\cos\theta_\alpha+w_\alpha\sin\theta_\alpha=0$$

with $$0<\theta_i<\pi/2,i=1,\dots,\alpha.$$ Jordan calls these coordinates canonical. By definition, the angles $$\theta_i$$ are the angles between $$F$$ and $$G.$$

The non-negative integers $$\rho,\sigma,\tau,\upsilon,\alpha$$ are constrained by

$$\rho+\sigma+\tau+\upsilon+2\alpha=n,$$

$$\sigma+\tau+\alpha=k,$$

$$\sigma+\upsilon+\alpha=l.$$

For these equations to determine the five integers completely, besides the dimensions $$n,k$$ and $$l $$ and the number $$\alpha$$ of angles $$\theta_i,$$ the non-negative integer $$\sigma$$ must be given. This is the number of coordinates $$y_i,$$ whose corresponding axes are those lying entirely within both $$F$$ and $$G.$$ The integer $$\sigma$$ is thus the dimension of $$F\cap G.$$ The set of angles $$\theta_i$$ may be supplemented with $$\sigma$$ angles zero to indicate that $$F\cap G$$ has this dimension.

Jordan's proof applies essentially unaltered when $$E^n$$ is replaced with the $$n$$-dimensional inner product space $$\mathbf C^n$$ over the complex numbers.

Angles between subspaces
When $$E^n$$ or $$\mathbf C^n$$ equipped with the above coordinates (which requires that $$F$$ and $$G$$ intersect) is viewed as a vector space, the flats $$F$$ and $$G$$ are subspaces. Jordan's definition thus leads to a definition of angles between subspaces of an $$n$$-dimensional inner product space over the real or complex numbers.

For any one $$\xi$$ of the above coordinates let $$\hat\xi$$ be the unit vector of the $$\xi$$ axis. The vectors $$\hat y_1,\dots,\hat y_\sigma,$$ $$\hat w_1,\dots,\hat w_\alpha,$$ $$\hat z_1,\dots,\hat z_\tau$$ then form an orthonormal basis for $$F$$ and the vectors $$\hat y_1,\dots,\hat y_\sigma,$$ $$\hat w'_1,\dots,\hat w'_\alpha,$$ $$\hat u_1,\dots,\hat u_\upsilon$$ form an orthonormal basis for $$G,$$ where

$$\hat w'_i=\hat w_i\cos\theta_i-\hat v_i\sin\theta_i,\quad i=1,\dots,\alpha.$$

Being the unit vectors of canonical axes, these basic vectors may be called canonical.

When $$a_i,i=1,\dots,k$$ denote the members of the basis for $$F$$ and $$b_i,i=1,\dots,l$$ the members of the basis for $$G$$ then the inner product $$\langle a_i,b_j\rangle$$ vanishes for any pair of $$i$$ and $$j$$ except the following ones.

$$\langle\hat y_i,\hat y_i\rangle=1,\quad i=1,\dots,\sigma,$$

$$\langle\hat w_i,\hat w'_i\rangle=\cos\theta_i,\quad i=1,\dots,\alpha.$$

With the above ordering of the basic vectors, the matrix of the inner products $$\langle a_i,b_j\rangle$$ is thus diagonal. In other words, if $$(a'_i,i=1,\dots,k)$$ and $$(b'_i,i=1,\dots,l)$$ are arbitrary orthonormal bases in $$F$$ and $$G$$ then the real, orthogonal or unitary transformations from the basis $$(a'_i)$$ to the basis $$(a_i)$$ and from the basis $$(b'_i)$$ to the basis $$(b_i)$$ realise a singular value decomposition of the matrix of inner products $$\langle a'_i,b'_j\rangle.$$ The diagonal matrix elements $$\langle a_i,b_i\rangle$$ are the singular values of the latter matrix. By the uniqueness of the singular value decomposition, the vectors $$\hat y_i$$ are then unique up to a real, orthogonal or unitary transformation among them, and the vectors $$\hat w_i$$ and $$\hat w'_i$$ (and hence $$\hat v_i$$) are unique up to equal real, orthogonal or unitary transformations applied simultaneously to the sets of the vectors $$\hat w_i$$ characterised by a common value of $$\theta_i$$ and to the corresponding sets of vectors $$\hat w'_i$$ (and hence to the corresponding sets of $$\hat v_i$$).

A singular value $$1$$ can be interpreted as $$\cos\,0$$ corresponding to the angles $$0$$ introduced above and associated with $$F\cap G$$ and a singular value $$0$$ can be interpreted as $$\cos \pi/2$$ corresponding to right angles between the orthogonal spaces $$F\cap G^\bot$$ and $$F^\bot\cap G,$$ where superscript $$\bot$$ denotes the orthogonal complement.

Variational characterisation
The variational characterisation of singular vaues and vectors implies as a special case a variational characterisation of the angles between subspaces and their associated canonical vectors. This characterisation includes the angles $$0$$ and $$\pi/2$$ introduced above and orders the angles by increasing value. It can be given the form of the below alternative definition. In this context, it is customary to talk of principal angles and vectors.

Definition
Let $$V$$ be an inner product space. Given two subspaces $$\mathcal{U},\mathcal{W}$$ with $$\operatorname{dim}(\mathcal{U})=k\leq \operatorname{dim}(\mathcal{W}):=l$$, there exists then a sequence of $$k$$ angles $$ 0 \le \theta_1 \le \theta_2 \le \ldots \le \theta_k \le \pi/2$$ called the principal angles, the first one defined as


 * $$\theta_1:=\min \left\{ \arccos \left( \left. \frac{ |\langle u,w\rangle| }{\|u\| \|w\|}\right) \right| u\in \mathcal{U}, w\in \mathcal{W}\right\}=\angle(u_1,w_1),$$

where $$\langle \cdot, \cdot \rangle $$ is the inner product and $$\|\cdot\|$$ the induced norm. The vectors $$u_1$$ and $$w_1$$ are the corresponding principal vectors.

The other principal angles and vectors are then defined recursively via


 * $$\theta_i:=\min \left\{ \left. \arccos \left( \frac{ |\langle u,w\rangle| }{\|u\| \|w\|}\right) \right| u\in \mathcal{U},~w\in \mathcal{W},~u\perp u_j,~w \perp w_j \quad \forall j\in \{1,\ldots,i-1\} \right\}.$$

This means that the principal angles $$(\theta_1,\ldots \theta_k)$$ form a set of minimized angles between the two subspaces, and the principal vectors in each subspace are orthogonal to each other.

Geometric Example
Geometrically, subspaces are flats (points, lines, planes etc.) that include the origin, thus any two subspaces intersect at least in the origin. Two two-dimensional subspaces $$\mathcal{U}$$ and $$\mathcal{W}$$ generate a set of two angles. In a three-dimensional Euclidean space, the subspaces $$\mathcal{U}$$ and $$\mathcal{W}$$ are either identical, or their intersection forms a line. In the former case, both $$\theta_1=\theta_2=0$$. In the latter case, only $$\theta_1=0$$, where vectors $$u_1$$ and $$w_1$$ are on the line of the intersection $$\mathcal{U}\cap\mathcal{W}$$ and have the same direction. The angle $$\theta_2>0$$ will be the angle between the subspaces $$\mathcal{U}$$ and $$\mathcal{W}$$ in the orthogonal complement to $$\mathcal{U}\cap\mathcal{W}$$. Imagining the angle between two planes in 3D, one intuitively thinks of the largest angle, $$\theta_2>0$$.

Algebraic Example
In 4-dimensional real coordinate space R4, let the two-dimensional subspace $$\mathcal{U}$$ be spanned by $$u_1=(1,0,0,0)$$ and $$u_2=(0,1,0,0)$$, while the two-dimensional subspace $$\mathcal{W}$$ be spanned by $$w_1=(1,0,0,a)/\sqrt{1+a^2}$$ and $$w_2=(0,1,b,0)/\sqrt{1+b^2}$$ with some real $$a$$ and $$b$$ such that $$|a|<|b|$$. Then $$u_1$$ and $$w_1$$ are, in fact, the pair of principal vectors corresponding to the angle $$\theta_1$$ with $$\cos(\theta_1)=1/\sqrt{1+a^2}$$, and $$u_2$$ and $$w_2$$ are the principal vectors corresponding to the angle $$\theta_2$$ with $$\cos(\theta_2)=1/\sqrt{1+b^2}$$

To construct a pair of subspaces with any given set of $$k$$ angles $$\theta_1,\ldots,\theta_k$$ in a $$2k$$ (or larger) dimensional Euclidean space, take a subspace $$\mathcal{U}$$ with an orthonormal basis $$(e_1,\ldots,e_k)$$ and complete it to an orthonormal basis $$(e_1,\ldots, e_n)$$ of the Euclidean space, where $$n\geq 2k$$. Then, an orthonormal basis of the other subspace $$\mathcal{W}$$ is, e.g.,


 * $$(\cos(\theta_1)e_1+\sin(\theta_1)e_{k+1},\ldots,\cos(\theta_k)e_k+\sin(\theta_k)e_{2k}).$$

Basic Properties
If the largest angle is zero, one subspace is a subset of the other.

If the smallest angle is zero, the subspaces intersect at least in a line.

The number of angles equal to zero is the dimension of the space where the two subspaces intersect.