Distance of point to line (cross product)

Click For Summary
SUMMARY

The discussion focuses on calculating the distance from a point to a line using the cross product method. The user attempts to find the distance from point A(1,2,0) to the line defined by points B(0,1,2) and C(3,1,1) using vectors BA and BC. The correct approach involves using the formula |BA|sin(Y) = |BA x BC| / |BC|, where |BA x BC| is computed using the determinant method. The user learns that to find |BA x BC|, one must calculate the determinant of the vectors and then find the magnitude of the resulting vector.

PREREQUISITES
  • Understanding of vector operations, specifically cross product
  • Familiarity with determinants in linear algebra
  • Knowledge of trigonometric relationships involving sine and angles
  • Ability to compute vector magnitudes
NEXT STEPS
  • Learn how to calculate the cross product of two vectors using the determinant method
  • Study the geometric interpretation of the cross product in three-dimensional space
  • Explore the relationship between sine, angles, and vector projections
  • Practice calculating distances from points to lines using various methods
USEFUL FOR

Students studying vector calculus, mathematicians, and anyone interested in computational geometry or physics applications involving distances in three-dimensional space.

quietrain
Messages
648
Reaction score
2

Homework Statement


hi

i was wondering how exactly one should find the distance of a point to a line using cross product

for example, the distance from A(1,2,0) to a line running through B(0,1,2) & C(3,1,1) with Y being angle between BA and BC

BC = 3,0,-1
BA = 1,1,-2

so by using cross product formula, i get |BA|sin(Y) = |BAxBC| / |BC|

The Attempt at a Solution



i tried to calculate |BAxBC| by using the determinant method and i got 0, so the length = 0 too. how come?

so how do i compute the value |BAxBC| ? if i equate to |BA||BC|sinY, wouldn't it cancel out everything in the equation?

so i tried just calculating |BA|sinY by squaring & subsituting sin2Y to (1-cos2Y) and then using the dot product rule and then squarerooting it to get the answer sqrt3.5

so what have i done wrong? is my concept wrong? which way is correct? thanks!
 
Physics news on Phys.org
quietrain said:

Homework Statement


hi

i was wondering how exactly one should find the distance of a point to a line using cross product

for example, the distance from A(1,2,0) to a line running through B(0,1,2) & C(3,1,1) with Y being angle between BA and BC

BC = 3,0,-1
BA = 1,1,-2

so by using cross product formula, i get |BA|sin(Y) = |BAxBC| / |BC|

The Attempt at a Solution



i tried to calculate |BAxBC| by using the determinant method and i got 0, so the length = 0 too. how come?

so how do i compute the value |BAxBC| ? if i equate to |BA||BC|sinY, wouldn't it cancel out everything in the equation?

so i tried just calculating |BA|sinY by squaring & subsituting sin2Y to (1-cos2Y) and then using the dot product rule and then squarerooting it to get the answer sqrt3.5

so what have i done wrong? is my concept wrong? which way is correct? thanks!

The easiest way I can think of off the top of my head is to project the vector on to the line and then subtract the projected vector from the point vector.

So to recap:

1) Project "point-vector" on to the "line-vector"
2) Subtract result of 1) from "point-vector"
3) Calculate the distance of vector in 2 to get your distance
 
chiro said:
The easiest way I can think of off the top of my head is to project the vector on to the line and then subtract the projected vector from the point vector.

So to recap:

1) Project "point-vector" on to the "line-vector"
2) Subtract result of 1) from "point-vector"
3) Calculate the distance of vector in 2 to get your distance

ah thank you for telling me another alternative

but i still don't understand how to use the cross product to calculate the distance, because my notes says one can use cross product to do so.
 
quietrain said:
ah thank you for telling me another alternative

but i still don't understand how to use the cross product to calculate the distance, because my notes says one can use cross product to do so.

Think back to trigonometry. When you have the sin of the angle and the length of a side, what can you deduce about finding the other respective side?

Also remember that one side will be perpendicular since that is the shortest vector between the point and the line.
 
chiro said:
Think back to trigonometry. When you have the sin of the angle and the length of a side, what can you deduce about finding the other respective side?

Also remember that one side will be perpendicular since that is the shortest vector between the point and the line.

i know that sin theta will give you the opposite perpendicular side, but if you see the formula that i have written on my 1st post, the formula in essence is self cancelling.
which puzzles me on how exactly should i compute |BA|sin(Y) = |BAxBC| / |BC|

"so how do i compute the value |BAxBC| ? if i equate to |BA||BC|sinY, wouldn't it cancel out everything in the equation?"
 
quietrain said:
i know that sin theta will give you the opposite perpendicular side, but if you see the formula that i have written on my 1st post, the formula in essence is self cancelling.
which puzzles me on how exactly should i compute |BA|sin(Y) = |BAxBC| / |BC|

"so how do i compute the value |BAxBC| ? if i equate to |BA||BC|sinY, wouldn't it cancel out everything in the equation?"

What you are doing is correct:

The definition of A x B (A and B are vectors) is

A x B = |A||B|sin(theta)N where N is the normal vector.

Based on this we can calculate |A X B| as

|A x B| = |A||B|sin(theta)|N| = |A||B|sin(theta) x 1 = |A||B|sin(theta)

Dividing by |A| you get

|A X B|/|A| = |B|sin(theta)

which is what you want.
 
chiro said:
What you are doing is correct:

The definition of A x B (A and B are vectors) is

A x B = |A||B|sin(theta)N where N is the normal vector.

Based on this we can calculate |A X B| as

|A x B| = |A||B|sin(theta)|N| = |A||B|sin(theta) x 1 = |A||B|sin(theta)

Dividing by |A| you get

|A X B|/|A| = |B|sin(theta)

which is what you want.

oh so i just use the determinant formula to get |A X B| and then find the magnitude and then divide by the magnitude of |A|?
 
quietrain said:
oh so i just use the determinant formula to get |A X B| and then find the magnitude and then divide by the magnitude of |A|?

To find A x B you use the determinant

| i j k |
| Ax Ay Az|
| Bx By Bz|

where the x,y,z are the components of the respective axis and (i,j,k) are the standard basis in euclidean 3 space.

To Find |A X B| use the norm which is basically

d = SQRT(x^2 + y^2 + z^2) where (x,y,z) = A x B

Finding |A| is the same.
 
chiro said:
To find A x B you use the determinant

| i j k |
| Ax Ay Az|
| Bx By Bz|

where the x,y,z are the components of the respective axis and (i,j,k) are the standard basis in euclidean 3 space.

To Find |A X B| use the norm which is basically

d = SQRT(x^2 + y^2 + z^2) where (x,y,z) = A x B

Finding |A| is the same.

ah i see thanks!
 

Similar threads

Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
8
Views
3K
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K