angle between subspaces Let $E$ be a finite dimensional real inner product space.  I want to define the angle between two subspaces $E_1$ and $E_2$.  This has a fairly obvious meaning if $E_1$ is 1-diemsnional: Take the angle between any non-zero vector in $E_1$ and its orthogonal projection onto $E_2$.
There are a number of other cases that can be treated ad-hoc, if one is a hyperplane, or the dihedral angle between planes in $R^3$.
In general, it isn't quite clear what the right definition is.  I see two possibilities:


*

*If $p=\dim E_1\le \dim E_2$, consider the two subspace $\lambda^p(E_1)$ and $\Lambda^p(E_2$   of $\Lambda^p(E)$ (which is also an inner product space, and proceed as above, since $\Lambda^p(E_1)$ is a line.

*$Hom(E,E)$ is itself an inner product space with the inner product 
$$
\langle A,B\rangle=trace  A^\top B.
$$
Let $A_i$ be the orthogonal projection onto $E_i$ and take the angle between $A_1$ and $A_2$.
Are either of these definitions standard?  Are they equivalent (I think so)?  Is there another definition, perhaps more immediate?
 A: Let me confuse you some more. There is a third possibility that is used frequently in functional analysis. Define
$$\delta(E_1,E_2)= \sup_{x\in E_1,\;|x|=1}{\rm dist}\; (x,E_2). $$
The number $\delta(E_1,E_2)$ is called the gap between $E_1$ and $E_2$. Clearly $\delta(E_1, E_2)\in [0,1]$ so that there exists $\theta\in [0,\frac{\pi}{2}]$ such that 
$$\delta(E_1,E_2)=\sin \theta.$$
We define the above $\theta$ to be the angle between $E_1,E_2$.     Note that if $\dim E_1=1$, than this definition agrees with  your first definition. However
$$\delta(E_1, E_2)\neq \delta(E_2,E_1).$$
Moreover
$$ \theta <\frac{\pi}{2} \Longleftrightarrow \delta(E_1,E_2)<1 \Longleftrightarrow E_1\cap E_2^\perp= 0. $$
Your first definition of  angle has a similar property. Finally let me point out that
$$ \delta(E_1,E_2)= \Vert P_{E_2^\perp}P_{E_1}\Vert,  $$
where $P_U$ denotes the orthogonal projection onto the subspace $U$, and for any linner operator $A$ we set
$$ \Vert A\Vert =\sup_{|x|=1} |Ax|. $$
A: I know this is a few years late, but still it might be useful ...
A nice way to express Dan's answer is to let $A$ and $B$ be matrices whose columns form orthonormal bases for $E_1$ and $E_2$ respectively. Then the cosines of the principal angles are the singular values of the matrix $A^TB$ (or of $B^TA$ of course).  
A: There is a standard answer: Principal angles, see http://en.wikipedia.org/wiki/Principal_angles.  
Let $p \ge q$ be the dimensions of the two subspaces $E_1$ and $E_2$.  Then there is a unique non-increasing sequence $[c_1,c_2,...,c_q]$ with entries in $[0,1]$ (and a matching non-decreasing sequence $[s_1,s_2,...,s_q]$) such that one can have an orthonormal basis for $E$, call it $e_1,e_2,...$, in such a way that one subspace is generated by orthonormal vectors $$e_1,e_2,...,e_p$$ and the other subspace generated by orthonormal vectors $$c_1e_1+s_1e_{p+q},c_2e_2+s_2e_{p+q-1},...,c_qe_q+s_qe_{p+1}.$$  One can see this from the Singular Value Theorem.  The principal angles are obviously those angles whose cosines match the $c_i$ values.  
This concept captures all of the geometric invariant information relating the positioning of the two subspaces, so any well-defined definition you care to give must be a deterministic function of this sequence of principal angles. 
