# Euclidean distance of set of orthogonal vectors

Let's define $$x$$ as a vector in $$\mathbb R^n$$

Let's define $$V$$ as the set of all vectors orthogonal to $$x$$, i.e $$V$$={$$y$$ in $$\mathbb R^n$$|$$x·y=0$$}

Let's define $$z$$ as another vector in $$\mathbb R^n$$

Calculate the distance between $$z$$ and the nearest point to $$z$$ in $$V$$, i.e min||z-y|| for a vector $$y$$ in $$V$$.

After thinking about this, would the answer be $$0$$? For example, let's say x is the z-axis (0,0,1). So the vectors in V would be the ones around it of any length in the x-y axis. If z is any other vector in $$\mathbb R^n$$, wouldn't the euclidean distance between z and a vector in V be $$0$$? Because you could find any vector in V that would intersect z or be infinitesimally close.

If my thinking process is wrong, any help would be great! I'm looking for a way to formalize my thoughts better :)

Are you familiar with orthogonal decomposition? If we take a vector x as you have done, then we could normalize it and obtain an orthonormal basis with $$\frac{x}{||x||}$$ as a first vector. Your V would then be the space created by all the other vectors in the orthonormal basis. Also, what do u really mean by "intersection"? If what you defined as $$z$$ has a non-zero component in the $$\frac{x}{||x||}$$ axis, then your minimum will be bigger than zero. If you have any questions, feel free to ask

Edit: The correct generalization of the distance from a given vector to the given subspace is the projection of the given vector onto the subspace. The projection can be found by, for example, switching your vector into a basis where the some vectors are the ones that create the subspace and thus looking at the components of the vector in the remaining subspaces.

• Hi, thanks for the answer! I think I remember orthogonal decomposition (it's been a while) and your explanation makes sense. To make sure I'm understanding this correctly, the other vectors in the orthonormal basis would be (1,0,0) and (0,1,0) and (x,y,0) where root(x^2+y^2)=1, right? And can you explain a bit more about the minimum being greater than zero? Thanks! Jan 25 '19 at 18:42
• Yes, for your example basis you can complete it with (1,0,0) and (0,1,0).For the minimum, the key thing to realize is that the distance between a vector and some subspace can only be zero when the vector itself is part of the subspace. In your example, if you have take a vector where the z component is non zero, it cannot be part of that subspace because it wouldn't necessarily be orthogonal. Jan 25 '19 at 18:45
• Ah, that totally makes sense to me. If I try to explain this more, my thoughts were that since the set V contains all vectors orthogonal to the z-axis, V contains all vectors of the form (x,y,0), where x,y∈ℝ. So if z was (0,0,1) and a vector in V was (x,0,0) where x was infinitesimally small, wouldn't the distance between the vector and z be almost 0? Jan 25 '19 at 18:56
• Ah, well i understand your confusion. This isn't what people commonly mean by distance when vectors are involved. You seem to be thinking that the distance is 0 when vectors intersect when taken as lines from the origin. But in that case, since every vector is given relative to the origin, wouldnt all vectors intersect(at the origin)? Jan 25 '19 at 18:57
• You're right. I understand that now (my bad!). But am I still correct that V contains all vectors of the form (x,y,0), where x,y∈ℝ? Because if that's the case, I still find it difficult to generalize this answer without using this specific example :( Jan 25 '19 at 19:07

In your example you chose that $$x=(0,0,1)\Rightarrow y=(x,y,0)$$ where $$x,y\in\mathbb{R}$$. If you choose that $$z=(1,1,1)$$ in your example, you will have that $$\min|z-y|=\min|(1-x,1-y,1)|=1$$.

• That makes sense. Do you have any idea on how to generalize that example? or would the minimum always be 1 Jan 25 '19 at 18:45
• The general idea is that the minimum distance between z and y is how much z "points" in the x-direction. If we let $z=(a,b,c)$ we have $\min|(a-x,b-y,c)|=|c|$, since $x$ and $y$ are just arbitrary numbers we choose $x=a$ and $y=b$. Jan 25 '19 at 18:54