Distance between Line and Plane

treddie

New member
Joined
Jun 4, 2016
Messages
4
Hello!

I am reviewing the basics of linear algebra to make sure I keep current on the fundamentals (Gaussian Elimination, calculating inverses, etc.). But doing it from a cellphone in a hospital bed. I have run into one snag, however;

The distance of a point from a plane can be written as:
p = (AT A)-1 AT b

(b), I assume, is the vector to the point, whose distance from the plane is to be measured, and I assumed that what goes into matrix A are the vectors that define the plane in 3D space.
But the answer I get is wrong.

What am I missing?

Thank you for any replies!
 
Last edited:
Sorry, I should have added details.

I have my plane described as v1 = 2, 1, 0, and v2 = 1, 3, 0. So that is my basis. I originally thought I would need to include the 3space axis (z) in the basis description, but then realized it was unneccessary...The two vectors, v1 and v2 are a complete description of the plane. It is a coincidence in this example that the plane is coincident with the x, y plane of the implied universe.

Point (b), the point whose distance from the plane is to be measured = 1, 1, 2.

So I loaded my matrix (A)'s, 1st two columns with v1 and v2. So what goes into Matrix A's 3rd column? I recall something about putting all 1s in the 3rd column, or something like, 0, 0, 1. But nothing works when calculating (AT)-1ATb.

I have followed the proper order for multiplying matrices.


Clearly, tha answer should be p = (0, 0, 2). But I get p = (-2/5, -1/5, 2). The magnitude of which should = 2.
 
Last edited:
Any replies would be greatly appreciated, even if you don't know the answer.

Odd thing about this is that I cannot find any examples of this technique, online.
All I can find are geometric methods. My linear algebra book at home this ,but I
can't get to it.
 
I've got it now. I actually found a downloadable version of my old textbook online. The other online references were not complete analogues to my problem.

The correct projection matrix was P = A(ATA)-1AT. And there was no need for an extra column of 1s.

Life is good now.
 
Top