# Angle between two planes in four dimensions

Suppose I have two planes defined in 4D space, either in terms of vectors spanning the planes, $X = t_1 A_1 + t_2 B_2$ and $X = t_3 A_3 + t_4 B_4$ (where $X$, $A$'s, and $B$'s are vectors with four elements and $t$'s are scalars), or in terms of null space, $[C_1; D_1] X = 0$ and $[C_2; D_2] X = 0$ (where the matrices are $2$ x $4$ and $X$ has four elements).

I understand that these two planes generally intersect in just a single point (unless the matrix $[C_1; D_1; C_2; D_2]$ is rank deficient). But is it meaningful to ask what the angle is between the planes? If so, how would it be computed? There is an explicit formula for the 3D case: simply the angle between the normals to the planes. Is there no equivalent explicit expression for the 4D case?

• So how would that be computed? Would I have to conduct a minimization?
– 8bar
Aug 27, 2014 at 13:35
• Such as: min invcos(X1.X2/(norm(x1) norm(x2))) s.t. C1.X1=0, D1.X1=0, C2.X2=0, D2.X2=0? Surely there must be a simpler way...
– 8bar
Aug 27, 2014 at 13:45
• I guess one minor simplification would be that min invcos(X1.X2/(norm(x1) norm(x2))) would be equivalent to max X1.X2/(norm(x1) norm(x2))
– 8bar
Aug 27, 2014 at 13:51
• Yes, that's right, also notice that changing vector length doesn't affect angles, so you might as well restrict to unit length vectors, and now you're just maximizing $X_1 \cdot X_2$. There's a circle of each of these in each plane, and we can parameterize these circles in terms of your $A$'s and $B$'s. We might as well assume your bases $(A_i, B_{i + 1})$, $i = 1, 3$ for the planes are orthonormal, in which case we can parameterize the circle of unit vectors by $r_i(\theta) := A_i \cos \theta + B_i \sin \theta$. Aug 27, 2014 at 13:53
• The fact that the orthogonal complement of a plane in $\mathbb{R}^3$ is a line means that computing the angle between two planes is the same as computing the angle between two lines, which boils down to computing the angle between two suitably chosen vectors on those two lines, respectively. However, the orthogonal complement of a $2$-plane in $\mathbb{R}^4$ is just another $2$-plane, so no such simplification is possible. Aug 27, 2014 at 14:25

Choose orthonormal bases $$(E_1, E_2)$$ and $$(F_1, F_2)$$ for the two planes. Then, the (hyper)volume of the parallelepiped spanned by the $$E_1, E_2, F_1, F_2$$ on the one hand is $$\sin \theta$$ where $$\theta$$ is the angle between the two planes, and on the other hand is (the absolute value of) the determinant of the matrix given by adjoining the four vectors:

$$\left\vert\det[E_1 \, E_2 \, F_1 \, F_2]\right\vert .$$

This quantity is independent of the choices of orthogonal bases, and in fact, we can even take the bases of the planes to be any that span parallelograms of unit area, so we don't need to produce an orthogonal basis.

If we start out with any bases $$(E_i)$$ or $$(F_i)$$, say ones that span areas $$\lambda$$ and $$\mu$$, we can always normalize them by rescaling vectors, but we might as well build this into our equation: The bases $$(\lambda^{-1} E_1, E_2)$$ and $$(\mu^{-1} F_1, F_2)$$ both span parallelograms of unit area, so for general bases the angle satisfies

$$\sin \theta = |\det[\lambda^{-1} E_1 \, E_2 \, \mu^{-1} F_1 \, F_2]| = \frac{|\det[E_1 \, E_2 \, F_1 \, F_2]|}{\lambda \mu},$$

which we might write as

$$\color{#bf0000}{\boxed{\sin \theta = \dfrac{|\det[E_1 \, E_2 \, F_1 \, F_2]|}{|E_1 \wedge E_2| |F_1 \wedge F_2|}}} ,$$

where $$|G_1 \wedge G_2|$$ denotes the area of the parallelogram spanned by $$G_1, G_2$$.

This formula generalizes readily to formulas the angle between $$k$$-planes and $$(n - k)$$-planes in vector spaces of dimension $$n$$ (try this for the familiar situation $$n = 2$$, $$k = 1$$), and with just a little more work to finding the angle between $$k$$- and $$l$$- planes in vector spaces of dimension more than $$k + l$$.

Remark This leaves the matter of computing explicitly the areas $$|G_1 \wedge G_2|$$ of the parallelograms that the bases define. The area $$A$$ of the parallelogram defined by vectors $$H_1 = (x_1, y_1), H_2 = (x_2, y_2)$$ in the plane is $$A = \left\vert\det \left(\begin{array}{cc} x_1 & x_2 \\ y_1 & y_2\end{array}\right)\right\vert = |x_1 y_2 - x_2 y_1|$$, and its square is $$A^2 = (x_1 y_2 - x_2 y_1)^2$$, which we can rewrite as

$$A^2 = [(x, y) \cdot (x, y)] [(x', y') \cdot (x', y')] - [(x, y) \cdot (x', y')]^2 = (H_1 \cdot H_1) (H_2 \cdot H_2) - (H_1 \cdot H_2)^2 .$$

Now, the formula $$A^2 = (H_1 \cdot H_1) (H_2 \cdot H_2) - (H_1 \cdot H_2)^2$$ doesn't depend on coordinates, it just uses the Euclidean structure (namely the dot product $$\cdot\,$$), so it works just as well for computing the areas of the parallelograms in our original problem, that is, we may write

$$|G_1 \wedge G_2|^2 = (G_1 \cdot G_1) (G_2 \cdot G_2) - (G_1 \cdot G_2)^2$$

and then take square roots.

• Wonderful @Travis! I obviously can't use the cross product to find the area of the parallelogram in 4D, but after a little searching, I found that the area of the parallelogram spanned by G1 and G2 is simply the square root of G1.G1 G2.G2 - (G1.G2)^2.
– 8bar
Aug 28, 2014 at 10:49
• @8bar, yes, the formula gives the sine of the angle, not the cosine (I was thinking of the usual dot product formula). Aug 28, 2014 at 11:07
• @8bar Yes, you're quite correct, I've added an explanation as a remark to my answer. Notice that the area $|x_1 y_2 - x_2 y_1|$ of the parallelogram in the ($(x, y)$-)plane is the length of the cross product of the vectors regarded as living in the $xy$-plane inside $xyz$-space, namely, $(x_1, y_1, 0), (x_2, y_2, 0)$, which gives rise in $3$ dimensions to the identity $(V \cdot V)(W \cdot W) = (V \cdot W)^2 + (V \times W) \cdot (V \times W)$. So the formula you point out for the area of the parallelogram does use cross product in a way, even though it applies in dimensions other than $3$. Aug 28, 2014 at 11:34
• @Travis said, "This generalizes readily to formulas the angle between k-planes and (n−k)-planes in vector spaces of dimension n (try this for the familiar situation n=2, k=1), and with just a little more work to finding the angle between k- and l- planes in vector spaces of dimension more than k+l." So does this generalize to the the angle between a plane and a line in 4D as well? I have two vectors spanning the plane and one vector spanning the line, so the matrix in the numerator isn't square.
– 8bar
Aug 29, 2014 at 12:36
• @user3257842 That identification is responsible, by the way, for the exceptional isomorphism $$\mathfrak{sl}(4, \Bbb C) \cong \mathfrak{so}(6, \Bbb C)$$ and its relatives. Mar 7 at 16:21

I wonder whether we should distinguish following two cases when defining angle between two planes (not intersecting) in dimension four.

Case one is when both planes $K$, $L$ belong to the same complex structure on $\mathbb R^4$. In such case for each vector $v$ in $K$ angle between $v$ and $L$ is the same. (The angle between vector $v$ and plane $L$ is defined as minimum angle between vectors $v$ and $w$ for $w$ in $L$). The examples are $K=<[1,0,0,0], [0,1,0,0]>, L_1=<[1,1,1,1]/2, [-1,1,-1,1]/2>$ $L_2:=<[t,0,1,-s]/2,[0,t,s,1]/2>$. In this definition $t=\dfrac{\sqrt 5-1}{2}$ and $s=\dfrac{\sqrt 5+1}{2}$.

Case two is when both planes $K$, $L$ do not belong to the same complex structure. In this case for $v$ in $K$ the resulting angle between $v$ and $L$ can vary depending on choice of $v$. Examples are $K=<[1,0,0,0], [0,1,0,0]>, L=<[1,1,1,1]/2, [0,1,-1,0]/\sqrt 2 >$, $L_2=<[1,1,1,1]/2, [0,1,-s, t]/2>$. How to define angle in this case ? We may define it as minimum of angles between vectors $v$ and $w$ for $v$ in $K$ and $w$ in $L$. We may also define it as determinant of matrix $[v_1,v_2,w_1,w_2]$ where $v_1,v_2$ is orthonormal basis of $K$ and $w_1, w_2$ is orthonormal basis of $L$.

Interesting question is to ask about product of reflections in the planes. By reflection in the plane I mean matrix which reverse vectors in the plane and fix vectors perpendicular to the plane. If the angle between planes is $\dfrac{2 \pi}{k}$ then we expect that product of reflections has order $k$.

Of course I do not settle things in my answer. I rather asked another questions here in order to expand horizons $\begin {matrix}'''\\{..}\\{\smile} \end {matrix}$

Note that the angle between two planes in $$\mathbb R^3$$ is not the smallest angle between two vectors from either plane: that would always give an angle of $$0$$ for any two planes (since they intersect). So that is not a good basis for a generalization.

The following alternative does generalise the concept of angle between planes in $$\mathbb R^3$$ to any two linear subspaces of $$\mathbb R^n$$ of equal dimension for $$n \geq 1$$. It also has the useful property that the angle is zero if and only if the subspaces are equal.

So let $$A, B \subseteq \mathbb R^n$$ be two non-zero linear subspaces of dimensions $$0 < d \leq n$$ and let $$\pi_A, \pi_B$$ be the orthogonal projections onto $$A$$ and $$B$$. Define $$\mu(A, B)$$ as the smallest eigenvalue of the map $$\pi_A \pi_B$$ restricted to $$A$$. (Note that $$\pi_A \pi_B$$ is a symmetric positive semi-definite endomorphism of $$A$$.) It turns out that

$$\begin{eqnarray} \mu(A, B) &\in& [0, 1] \\[1ex] \mu(A, B) &=& \mu(B, A) \end{eqnarray}$$

for all pairs of subspaces. Moreover, if we take $$A, B$$ to be lines (or planes) in $$\mathbb R^3$$ then $$\mu(A, B) = \cos^2(\alpha)$$ where $$\alpha$$ the angle between these lines (or planes). So, in general, we could define the angle $$\alpha$$ between spaces $$A, B$$ in the same way: $$\cos^2(\alpha) = \mu(A, B)$$.

The function $$\mu$$ can be computed in the following way. Let $$M_A, M_B$$ be $$n \times d$$ matrices such that their column spaces span $$A$$ and $$B$$ respectively and $$M_A^{\mathrm t} M_A = M_B^{\mathrm t} M_B = \mathbb 1_2.$$ (That is, their columns form orthonormal bases.) Then $$\mu(A, B)$$ is the smallest eigenvalue of the $$d \times d$$ matrix $$M_A^{\mathrm t} M_B M_B^{\mathrm t} M_A = (M_B^{\mathrm t} M_A)^{\mathrm t} M_B^{\mathrm t} M_A.$$

Given two vectors $$V_{1}$$, $$V_{2}$$ in a vector space $$\mathbb{R}^n$$, the angle $$\theta$$ between them is given by: $$\cos \theta = \dfrac{\langle V_{1},V_{2}\rangle}{|V_{1}||V_{2}|}$$

Given a plane spanned by $$E_{1}, E_{2}$$ and a plane spanned by $$F_{1}, F_{2}$$, with no further conditions imposed on them, the planes can be represented as $$2$$-forms $$E_{1}\wedge E_{2}$$ and $$F_{1}\wedge F_{2}$$, where $$\wedge$$ denotes the wedge product. The $$2$$-forms have the structure of a vector-space, so we can treat them as vectors. The angle $$\theta$$ between them is given by: $$\cos \theta = \dfrac{ \langle E_1 \wedge E_2\;, F_1 \wedge F_2\rangle}{|E_1 \wedge E_2| |F_1 \wedge F_2|}$$

Concretely, the formula gives:

$$\cos \theta = \dfrac{\langle E_1, F_1\rangle \langle E_2, F_2\rangle - \langle E_1, F_2\rangle \langle E_2, F_1\rangle}{ (|E_{1}|^2 |E_{2}|^2 -\langle E_1, E_2\rangle^2)^{\frac{1}{2}} ( |F_{1}|^2 |F_{2}|^2 -\langle F_1, F_2\rangle^2 )^{\frac{1}{2}} }$$

where $$\langle,\rangle$$ represents the dot product. The components of the denominator can be thought of as the areas of the parallelograms spanned by $$\{E_{1}, E_{2}\}$$, and $$\{F_{1},F_{2}\}$$. The nominator is more tricky, but can be thought of as the area of the projection of the parallelogram $$\{E_{1},E_{2}\}$$ onto the plane spanned by $$\{F_{1},F_{2}\}$$, scaled by the area of the parallelogram $$\{F_{1},F_{2}\}$$.

When $$E_2 = F_2$$, and $$\langle E_1, E_2 \rangle= \langle F_1, F_2 \rangle = 0$$, the formula reduces to: $$\cos \theta = \dfrac{\langle E_{1},F_{1}\rangle}{|E_{1}||F_{1}|}$$ . From this we know that when $$2$$ planes share a line, their angle is equal to the angle between the normals to that line.

One way to think of a $$2$$-form is as an antisymmetric matrix. We may define $$E_1 \wedge E_2 = \frac{1}{2}(|E_1 \rangle \langle E_2| - |E_2 \rangle \langle E_1|)$$ . For example, with $$A = (a_{1},a_{2},a_{3},a_{4})$$, $$B = (b_{1},b_{2},b_{3},b_{4})$$, we get $$A\wedge B = \frac{1}{2}\begin{pmatrix} 0 & a_1b_2 - a_2b_1 & a_1b_3-a_3b_1 & a_1b_4-a_4b_1\\ a_2b_1 - a_1b_2 & 0 & a_2b_3 - a_3b_2 & a_2b_4 - a_4b_2\\ a_3b_1 - a_1b_3 & a_3b_2 - a_2b_3 & 0 & a_3b_4 - a_4b_3\\ a_4b_1 - a_1b_4 & a_4b_2 - a_2b_4 & a_4b_3 - a_3b_4 & 0 \end{pmatrix}$$

Representing a plane with a wedge product of its spanning vectors has several advantages: assume the vectors $$\{F_{1}, F_{2}\}$$ and $$\{E_{1},E_{2}\}$$ span the same plane. Then the matrices $$(F_{1}\wedge F_{2})$$ and $$(E_{1}\wedge E_{2})$$ will differ at most by a scalar factor. Another advantage of wedge products is that they allow us to assign coordinates to planes (the indices of the associated antisymmetric matrix), and treat them as vectors in a higher-dimensional space.

In 3D, we tend to define the angle between two planes as the minimum angle of rotation required to turn one plane into the other. Rarely does this make sense in 4D. Let's see why.

In 4D we must get more specific about what a rotation is. In 3D, there is no distinction between a planar rotation, that is, a rotation which represents a spin in a plane by some angle, and a general rotation, henceforth referred to as "rotation", which preserves the magnitudes and relative angles of vectors.

In 4D, in general, rotations are decomposable into two planar rotations. They do not have a concept of an angular distance from identity. This also means that in 4D, in general, it requires two planar rotations by some angles to turn one plane into another (unless they already intersect along an axis).

If you choose two vectors, $$a_1$$ and $$a_2$$, who are unit and orthogonal, who span the plane, $$A$$, and two more unit orthogonal vectors $$b_1$$ and $$b_2$$, who span the plane, $$B$$, you can throw these into a matrix, and take the determinant to get the hypervolume of the hyperparallelepiped spanned by these vectors. That hypervolume is equivalent to the product of the sines of the two planar rotations which will rotate $$A$$ into $$B$$.

$$\sin(\theta_1)\sin(\theta_2)=\begin{vmatrix} a_{1_w} & a_{2_w} & b_{1_w} & b_{2_w} \\ a_{1_x} & a_{2_x} & b_{1_x} & b_{2_x} \\ a_{1_y} & a_{2_y} & b_{1_y} & b_{2_y} \\ a_{1_z} & a_{2_z} & b_{1_z} & b_{2_z} \\ \end{vmatrix}$$

There is an additional formula to get the cosine product. First we must extend the cross product to 2 vectors in 4D, using the wedge product.

$$\begin{pmatrix} a_w\\ a_x\\ a_y\\ a_z \end{pmatrix} \wedge \begin{pmatrix} b_w\\ b_x\\ b_y\\ b_z \end{pmatrix} = \begin{pmatrix} C_{wx}\\ C_{wy}\\ C_{wz}\\ C_{xy}\\ C_{xz}\\ C_{yz} \end{pmatrix}_2 = \begin{pmatrix} a_w b_x - a_x b_w\\ a_w b_y - a_y b_w\\ a_w b_z - a_z b_w\\ a_x b_y - a_y b_x\\ a_x b_z - a_z b_x\\ a_y b_z - a_z b_y \end{pmatrix}_2$$

Just as a vector represents a line as multiples of the basis vectors, this new bivector represents a plane as multiples of the basis planes, in the order, $$wx, wy, wz, xy, xz, yz$$.

$$A=a_1 \wedge a_2$$ $$B=b_1 \wedge b_2$$

We can take the dot product, or inner product, of plane $$A$$ with plane $$B$$ to get the product of the cosines of the two planar rotations which turn $$A$$ into $$B$$, and we can rewrite the determinant in terms of a wedge product

$$\cos(\theta_1)\cos(\theta_2) = A \cdot B$$ $$\sin(\theta_1)\sin(\theta_2) = A \wedge B$$

If planes $$A$$ and $$B$$ intersect, then the rotation which turns $$A$$ into $$B$$ will already be a planar rotation, and one of the $$\theta$$'s will be $$0$$. The hypervolume will be $$0$$, as one of the $$\sin$$'s will be $$0$$. The dot product of the wedge products will become $$\cos(\theta)$$, as one of the $$\cos$$'s will be $$1$$.

## Can we get a single angle?

In general, two planes, $$A$$ and $$B$$, in 4D will not intersect along an axis. This means that, in general, it is possible to find two directions, $$a$$ and $$b$$, the first who lives on the plane $$A$$, and the second who lives on plane $$B$$, who are perpendicular to each other. This means that, unlike in 3D, where colloquially the "maximum angle" between two planes is almost always $$<90^{\circ}$$, in 4D, the "maximum angle" between two planes is almost always $$90^{\circ}$$. So this measure is not useful.

It is also possible to find two directions, $$a$$ and $$b$$, on planes $$A$$ and $$B$$ respectively, who are closest to each other. In 3D, two planes always intersect, and so colloquially the "minimum angle" between two planes in 3D will always be 0. But in 4D, this is not so. Computing this angle is somewhat involved, however.

Because the first planar rotation must get plane $$A$$ to intersect with plane $$B$$, we can take the smallest $$\theta$$ to be the minimum angle between $$A$$ and $$B$$. By using the two formulae above, where $$c = \cos(\theta_1) \cos(\theta_2)$$ and $$s = \sin(\theta_1) \sin(\theta_2)$$, one can solve for $$\theta_1$$ and $$\theta_2$$.

$$\cos(\theta_1)=\frac{\sqrt{\sqrt{\left(-c^2+s^2+1\right)^2-4 s^2}+c^2-s^2+1}}{\sqrt{2}}$$ $$\sin(\theta_1)=\frac{\sqrt{-\sqrt{\left(-c^2+s^2+1\right)^2-4 s^2}-c^2+s^2+1}}{\sqrt{2}}$$ $$\cos(\theta_2)=\frac{c}{\cos(\theta_1)}$$ $$\sin(\theta_2)=\frac{s}{\sin(\theta_1)}$$

$$\theta_1$$ should always be the smaller angle.