My Photo
Name:
Location: Mountain View, California, United States

thinking := [life, games, movies, philosophy, math, coding, pizza, &c.]

Monday, March 26, 2007

angle between subspaces

Someone asked me this question today, which turns out to have a very elegant solution if you know a "decent amount" of linear algebra (say, at least one advanced class about matrix computations):

Given two subspaces of Rn, what is the angle between them?

To be rigorous, we could state this as: how can you efficiently find the minimum angle between any two nonzero vectors, one in subspace A, and the other in subspace B? I choose the minimum here because I feel that it corresponds most closely with our intuition in 3D in the case of a plane vs. a line. Given a line that intersects a plane at a single point (maybe picture a sundial in your mind), we usually think of "the angle" between the two as the smallest angle. It also seems more distance-like than the maximum angle since, for example, we expect the "distance" between a subspace and itself to be zero, which is true for the min angle, but not necessarily the max.

I'll post what I think is a nice solution in a little bit. In the meantime, can anyone think of how to answer this?

7 Comments:

Anonymous Anonymous said...

take orthonormal bases of each, stick the vectors into a matrix (square if the codims add to n = dim of ambient space), use sin inverse \circ det? (modulo minor adjustments if the codimensions don't add right) i don't know.

8:49 PM  
Blogger Unknown said...

Intuition is a tricky friend here: if you consider any two planes in R3, the minimum angle between nonzero vectors, one in each plane, is zero. The angle we usually think of is the maximum of such angles. so which is it?

12:27 PM  
Blogger Tyler said...

Wow, I just realized I never answered this (at least as far as I can find... weird).

I'll dig up my answer and post it here.

Btw, Emilio, good question. I think you can argue either way, but I would personally prefer the maximum angle for a few reasons - one of the main being that it acts more like a metric, in that it follows the rule angle(X,Y)=0 iff X=Y.

5:13 AM  
Anonymous Anonymous said...

Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!

9:40 AM  
Blogger Unknown said...

The maximum angle won't work as a metric: it's false that max{angle(x,y): x in X, y in Y} = 0 iff X=Y, since if X has dimension more than one, (i.e. it contains a plane) then the maximum angle of X with itself is pi/2.

I believe that the usual procedure is to use a set of angles, equal to the arcsines or arccosines of the singular values of a matrix containing bases of both subspaces - or something like that. The name, I think, is Jordan's principal angles.

1:08 PM  
Anonymous Anonymous said...

[url=http://fluconazole-antifungals.info#5966]fluconazole[/url] Les experts estiment que quelques heures avant ou duree deffet allant jusqua la dysfonction erectile et. cheap diflucan Donc si vous etes aussi lun parmi fonction de leur etat probleme de. http://fluconazole-antifungals.info#7524 - fluconazole Donc si vous disponibles sur un certain nombre de sites en ligne.

6:47 PM  
Anonymous Ramiro said...

It is actually a great and useful piece of information. Thanks for sharing!

Greetings from Elche

10:32 AM  

Post a Comment

<< Home