## distance between two linear subspaces

suppose v1 and v2 are two linear subspaces of a linear subspace v

is there any measure of the distance between the two subspaces?

in two dimensional complex space, i think the distance between x and y axes is the maximum possible value. Intuitively, if two subspaces are orthogonal to each other, then their distance is of the largest possible value.

 PhysOrg.com science news on PhysOrg.com >> Heat-related deaths in Manhattan projected to rise>> Dire outlook despite global warming 'pause': study>> Sea level influenced tropical climate during the last ice age
 Mentor You can use a norm or an inner product to turn the vector space into a metric space. $$d(x,y)=\|x-y\|=\sqrt{\langle x-y,x-y\rangle}$$ Then you can define the distance between subsets like this: $$d(A,B)=\inf\{d(x,y)|x\in A,\ y\in B\}$$ Edit: Now I see that you said subspaces. The distance I just defined is obviously =0 if A and B are subspaces. If your vector space is an inner product space over the real numbers, you can define the angle between two vectors by $$\cos\theta_{xy}=\frac{\langle x,y\rangle}{\|x\|\|y\|}$$ Now I suppose you could define $$d(A,B)=\inf\{\theta_{xy}|x\in A, y\in B\}$$ but I've never seen anyone do that.
 Assuming you have an Euclidean space V, assuming your two subspaces are of the same dimension, then the distance is given by $$||P_1-P_2||$$, where $$P_1,P_2$$ are orthogonal projection operators on these subspaces. This is essentially the same idea as the one mentioned by Fredrik.

Mentor

## distance between two linear subspaces

Your idea should work for complex vector spaces too. Is this the norm you have in mind?

$$\|A\|=\sup_{\|x\|=1}\|Ax\|$$

 Can be this, or can be the trace norm $$|||A|||^2=Tr(A^\dag A)$$, which may be easier to calculate.
 The best way to measure the distance between subspaces of a Banach space is to use the Hausdorff distance between their intersections with the unit sphere. This is a metric even for closed subsets of a Banach space. Let the subspaces be $E$ and $F$, and their intersections with the unit sphere $SE_1$ and $SE_2$. Then define $$d(E_1,E_2)= sup(\sup_{v\in SE_1} \inf{w\in SE_2} \|v-w\|, \sup_{v\in SE_2} \inf{w\in SE_1} \|v-w\|).$$ This is a metric, and it does induce the correct topology on all Grassmanians.

Recognitions:
Gold Member
Staff Emeritus
Exactly what kind of linear "linear subspace" are you referring to? In the usual definition of "subspace" of a vectors space, every subspace is required to contain the 0 vector. In terms of Euclidean spaces, that means they are all lines, planes, or hyper-planes that contain the origin. Since all subspaces contain the same point, the origin, the "distance" between two is 0.

 in two dimensional complex space, i think the distance between x and y axes is the maximum possible value. Intuitively, if two subspaces are orthogonal to each other, then their distance is of the largest possible value.
Yes, and, since the x and y axes both contain the origin, the "distance between them" is 0.

 Hello, I know this is an old thread but I am interested in this problem. I would like to know more about the approach mentioned by John Hubbard with the Haussdorf distance. Let's consider the plane R2 and try for example to calculate the Haussdorf distance between two lines passing through the origin (subspaces of dimension 1). Each line would intersect the unit-sphere $\mathcal{S}^1\subset \mathbb{R}^2$ in two antipodal points $\mathbf{a}\in \mathcal{S}^1$ and $-\mathbf{a}$. Hence we associate to the first line the set: $$A = \{ \mathbf{a},-\mathbf{a} \}$$, and to the second line the set: $$B = \{ \mathbf{b},-\mathbf{b} \}$$ Finally we calculate the Haussdorf distance $d_H(A,B)$ according to the definition given by John Hubbard. Is this approach correct? The main doubt I have about this procedure is related to the quantity $\left\|v-w \right\|$ mentioned in the definition of J.Hubbard. Is the $\left\|\cdot \right\|$ simply a L2-norm of the vector v-w in R2? Wouldn't it be more logical to use the shortest arc between points on the sphere instead of the norm $\left\|\cdot \right\|$ ? --- Regarding the approach suggested by arkajad, it is not very clear what it is meant by "orthogonal projection operators" $P_1$, $P_2$. Can anyone make an example for such an "orthogonal projection operator" in R2 ?

Recognitions:
 Quote by mnb96 Hello, I know this is an old thread but I am interested in this problem. I would like to know more about the approach mentioned by John Hubbard with the Haussdorf distance. Let's consider the plane R2 and try for example to calculate the Haussdorf distance between two lines passing through the origin (subspaces of dimension 1). Each line would intersect the unit-sphere $\mathcal{S}^1\subset \mathbb{R}^2$ in two antipodal points $\mathbf{a}\in \mathcal{S}^1$ and $-\mathbf{a}$. Hence we associate to the first line the set: $$A = \{ \mathbf{a},-\mathbf{a} \}$$, and to the second line the set: $$B = \{ \mathbf{b},-\mathbf{b} \}$$ Finally we calculate the Haussdorf distance $d_H(A,B)$ according to the definition given by John Hubbard. Is this approach correct? The main doubt I have about this procedure is related to the quantity $\left\|v-w \right\|$ mentioned in the definition of J.Hubbard. Is the $\left\|\cdot \right\|$ simply a L2-norm of the vector v-w in R2? Wouldn't it be more logical to use the shortest arc between points on the sphere instead of the norm $\left\|\cdot \right\|$ ? --- Regarding the approach suggested by arkajad, it is not very clear what it is meant by "orthogonal projection operators" $P_1$, $P_2$. Can anyone make an example for such an "orthogonal projection operator" in R2 ?
Take your standard cartesian axes. Then a point P=(x,y) projects orthogonally into

x,y respectively; in (x,y), x is the ortho. projection into the x-axis, y is the ortho into the y-axis. Same extends to ℝn. The general result is that, in

a Hilbert space H, given a subspace S and a point x in H\S , the projection P_S(x) of x into S

gives you the shortest distance between x and S , i.e., || x-P_S(x)||≤||x-s|| for all s in S.

 Hi Bacle, thanks for clarifying the issue on the orthogonal projection. However I still dont understand what arkajad was suggesting. He said that the distance between two subspaces is given by: |P1 - P2| where P1,P2 are orthogonal projection operators. So apparently he is not suggesting to calculate the projection of some point onto those subspaces, but from what he wrote he seems to want to calculate a distance between operators. This was the point that in my opinion needs to be discussed more.
 Recognitions: Science Advisor Hi, mnb96: You may be right, but what I imagine arkajad is doing is subtracting the images of projections into the origin: if we have, say, two parallel planes P1,P2, we find the perpendicular/orthogonal projection of the normal vectors into the origin, and the distance between the planes is the abs. value of the difference of the respective projections, so, in this case, the difference of the images. But maybe arkajad can come back and clarify things.
 Hi Bacle, thanks for the reply. If you can associate to each plane a normal vector, then I deduce you are in ℝ3. Since we are talking about linear subspaces, there cannot be two different parallel planes passing through the origin (subspaces of dimension 2), as the distance of their normal vectors will be always zero...however I got your explanation of projection operator. I believe both Fredrik and arkajad were assuming unit-vectors in their discussions, and in this sense I found the approach proposed by John Hubbard quite interesting and general (intersection of subspaces with the unit sphere, and then Haussdorf distance between subsets). In this regard, unfortunately nobody has answered to my first two questions that I underlined in my previous post.
 Recognitions: Science Advisor I think the OP is trying to construct a metric on a Grassmannian manifold. This might be something useful to look up. For example, if the subspaces are (real or complex) lines, then one should obtain the standard Fubini-Study metric on (real or complex) projective space. Then the distance between the subspaces is given by the "angular distance" mentioned earlier by Fredrik.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}