Understanding the distance between a line and a point in 3D space
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I know that there are quicker ways to do what I am about to present. But I want to understand why my approach does not work.
Let the point $P = (-6, 3, 3)$ and the line $L=(-2t,-6t,t)$.
I am trying to find the shortest distance between the point and the line. From my observation, I believe the line passes through the origin because it can be written as $$L=beginbmatrix0 \ 0 \ 0 endbmatrix +t beginbmatrix-2 \ -6 \ 1 endbmatrix $$.
Let $Q$ denoted $(a, b, c)$ be a point on $L$ such that $vecQP$ is the shortest distance between $L$ and $P$. Note that $vecQP$ is normal to $L$.
Therefore, I need to find $vecQP$ which is $vecP-vecQ$.
$vecQP = (-6 - a, 3 - b, 3 -c)$
We know that $vecQP$ and $L$ are perpendicular so the dot product is 0.
$$-2(-6 - a) - 6(3 - b) + (3 - c) = 0$$
Simplifying gives us
$$2a + 6b - c -3 = 0$$
let $a=0$, $b=1$, then by solving we know that $c=3$.
From my understanding, we should have found $Q$ which intersects $L$ and $vecQP$. Unfortunately, it seems $||vecQP||$ is not the correct answer. I think that the way I managed to pull out the $a$, $b$ and $c$ is the culprit, however I just don't understand what I did wrong.
linear-algebra
add a comment |Â
up vote
1
down vote
favorite
I know that there are quicker ways to do what I am about to present. But I want to understand why my approach does not work.
Let the point $P = (-6, 3, 3)$ and the line $L=(-2t,-6t,t)$.
I am trying to find the shortest distance between the point and the line. From my observation, I believe the line passes through the origin because it can be written as $$L=beginbmatrix0 \ 0 \ 0 endbmatrix +t beginbmatrix-2 \ -6 \ 1 endbmatrix $$.
Let $Q$ denoted $(a, b, c)$ be a point on $L$ such that $vecQP$ is the shortest distance between $L$ and $P$. Note that $vecQP$ is normal to $L$.
Therefore, I need to find $vecQP$ which is $vecP-vecQ$.
$vecQP = (-6 - a, 3 - b, 3 -c)$
We know that $vecQP$ and $L$ are perpendicular so the dot product is 0.
$$-2(-6 - a) - 6(3 - b) + (3 - c) = 0$$
Simplifying gives us
$$2a + 6b - c -3 = 0$$
let $a=0$, $b=1$, then by solving we know that $c=3$.
From my understanding, we should have found $Q$ which intersects $L$ and $vecQP$. Unfortunately, it seems $||vecQP||$ is not the correct answer. I think that the way I managed to pull out the $a$, $b$ and $c$ is the culprit, however I just don't understand what I did wrong.
linear-algebra
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I know that there are quicker ways to do what I am about to present. But I want to understand why my approach does not work.
Let the point $P = (-6, 3, 3)$ and the line $L=(-2t,-6t,t)$.
I am trying to find the shortest distance between the point and the line. From my observation, I believe the line passes through the origin because it can be written as $$L=beginbmatrix0 \ 0 \ 0 endbmatrix +t beginbmatrix-2 \ -6 \ 1 endbmatrix $$.
Let $Q$ denoted $(a, b, c)$ be a point on $L$ such that $vecQP$ is the shortest distance between $L$ and $P$. Note that $vecQP$ is normal to $L$.
Therefore, I need to find $vecQP$ which is $vecP-vecQ$.
$vecQP = (-6 - a, 3 - b, 3 -c)$
We know that $vecQP$ and $L$ are perpendicular so the dot product is 0.
$$-2(-6 - a) - 6(3 - b) + (3 - c) = 0$$
Simplifying gives us
$$2a + 6b - c -3 = 0$$
let $a=0$, $b=1$, then by solving we know that $c=3$.
From my understanding, we should have found $Q$ which intersects $L$ and $vecQP$. Unfortunately, it seems $||vecQP||$ is not the correct answer. I think that the way I managed to pull out the $a$, $b$ and $c$ is the culprit, however I just don't understand what I did wrong.
linear-algebra
I know that there are quicker ways to do what I am about to present. But I want to understand why my approach does not work.
Let the point $P = (-6, 3, 3)$ and the line $L=(-2t,-6t,t)$.
I am trying to find the shortest distance between the point and the line. From my observation, I believe the line passes through the origin because it can be written as $$L=beginbmatrix0 \ 0 \ 0 endbmatrix +t beginbmatrix-2 \ -6 \ 1 endbmatrix $$.
Let $Q$ denoted $(a, b, c)$ be a point on $L$ such that $vecQP$ is the shortest distance between $L$ and $P$. Note that $vecQP$ is normal to $L$.
Therefore, I need to find $vecQP$ which is $vecP-vecQ$.
$vecQP = (-6 - a, 3 - b, 3 -c)$
We know that $vecQP$ and $L$ are perpendicular so the dot product is 0.
$$-2(-6 - a) - 6(3 - b) + (3 - c) = 0$$
Simplifying gives us
$$2a + 6b - c -3 = 0$$
let $a=0$, $b=1$, then by solving we know that $c=3$.
From my understanding, we should have found $Q$ which intersects $L$ and $vecQP$. Unfortunately, it seems $||vecQP||$ is not the correct answer. I think that the way I managed to pull out the $a$, $b$ and $c$ is the culprit, however I just don't understand what I did wrong.
linear-algebra
linear-algebra
asked 2 hours ago
Cedric Martens
330211
330211
add a comment |Â
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
2
down vote
You have ignored completely the constraint $Q$ being a point on $L$. That imposes $b=3a$, for example, which your proposed $a=0,b=1$ does not satisfy.
add a comment |Â
up vote
1
down vote
You need to find the point $Q$ on $L$ minimizing the distance from $P$. Since $Q=(a,b,c)$ lies in $L$, $a,b,c$ must satisfy the relations $a=-2c$ and $b=-6c$. Further, $QP$ must be orthogonal to $L$, so $(a+6,b-3,c-3) cdot (-2,-6,1)=0$.
add a comment |Â
up vote
1
down vote
You want to minimize$$ D^2 = (2t-6)^2+(3+6t)^2+(3-t)^2$$
Differentiate to get $$4(2t-6)+12(3+6t)-2(3-t)=0$$
Solve for $t$ to get $t= frac -341$
That gives you the point on line to be $$Q=(frac 641,frac 1841, frac -341)$$
add a comment |Â
up vote
1
down vote
Let $v = (-6,3,3), u = (-2,-6,1)$
$v - frac ucdot v^2 u$
Describes a vector from a the line defined by $(0,0,0) + ut$ to the point $v$ that is orthogonal to $u.$
$|v - frac ucdot v^2 u|$ will be your distance.
$big(v - frac ucdot v^2 ubig)cdotbig(v - frac ucdot v^2 ubig) = |v|^2 - frac (ucdot v)^2^2$
Alternatively.
$d^2 = (-6+2t)^2 + (3+6t^2) + (3-t)^2\
d^2 = 54 +6t +41t^2\
d^2 = 41(t + frac 341)^2 - frac 941 + 54$
Distance is minimized when $t = -frac 341$
and
$d^2 = 54 - frac 941\
d = sqrt 54 - frac 941$
It is worth noting that
$54 = (-6,3,3)cdot(-6,3,3) = |v|^2\ -3 = (-6,3,3)cdot(-2,-6,1) = ucdot v\$
and $41 = (-2,-6,1)cdot(-2,-6,1) = |u|^2$
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You have ignored completely the constraint $Q$ being a point on $L$. That imposes $b=3a$, for example, which your proposed $a=0,b=1$ does not satisfy.
add a comment |Â
up vote
2
down vote
You have ignored completely the constraint $Q$ being a point on $L$. That imposes $b=3a$, for example, which your proposed $a=0,b=1$ does not satisfy.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You have ignored completely the constraint $Q$ being a point on $L$. That imposes $b=3a$, for example, which your proposed $a=0,b=1$ does not satisfy.
You have ignored completely the constraint $Q$ being a point on $L$. That imposes $b=3a$, for example, which your proposed $a=0,b=1$ does not satisfy.
answered 2 hours ago
user10354138
4,168220
4,168220
add a comment |Â
add a comment |Â
up vote
1
down vote
You need to find the point $Q$ on $L$ minimizing the distance from $P$. Since $Q=(a,b,c)$ lies in $L$, $a,b,c$ must satisfy the relations $a=-2c$ and $b=-6c$. Further, $QP$ must be orthogonal to $L$, so $(a+6,b-3,c-3) cdot (-2,-6,1)=0$.
add a comment |Â
up vote
1
down vote
You need to find the point $Q$ on $L$ minimizing the distance from $P$. Since $Q=(a,b,c)$ lies in $L$, $a,b,c$ must satisfy the relations $a=-2c$ and $b=-6c$. Further, $QP$ must be orthogonal to $L$, so $(a+6,b-3,c-3) cdot (-2,-6,1)=0$.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You need to find the point $Q$ on $L$ minimizing the distance from $P$. Since $Q=(a,b,c)$ lies in $L$, $a,b,c$ must satisfy the relations $a=-2c$ and $b=-6c$. Further, $QP$ must be orthogonal to $L$, so $(a+6,b-3,c-3) cdot (-2,-6,1)=0$.
You need to find the point $Q$ on $L$ minimizing the distance from $P$. Since $Q=(a,b,c)$ lies in $L$, $a,b,c$ must satisfy the relations $a=-2c$ and $b=-6c$. Further, $QP$ must be orthogonal to $L$, so $(a+6,b-3,c-3) cdot (-2,-6,1)=0$.
edited 1 hour ago
answered 2 hours ago
Gibbs
4,3572625
4,3572625
add a comment |Â
add a comment |Â
up vote
1
down vote
You want to minimize$$ D^2 = (2t-6)^2+(3+6t)^2+(3-t)^2$$
Differentiate to get $$4(2t-6)+12(3+6t)-2(3-t)=0$$
Solve for $t$ to get $t= frac -341$
That gives you the point on line to be $$Q=(frac 641,frac 1841, frac -341)$$
add a comment |Â
up vote
1
down vote
You want to minimize$$ D^2 = (2t-6)^2+(3+6t)^2+(3-t)^2$$
Differentiate to get $$4(2t-6)+12(3+6t)-2(3-t)=0$$
Solve for $t$ to get $t= frac -341$
That gives you the point on line to be $$Q=(frac 641,frac 1841, frac -341)$$
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You want to minimize$$ D^2 = (2t-6)^2+(3+6t)^2+(3-t)^2$$
Differentiate to get $$4(2t-6)+12(3+6t)-2(3-t)=0$$
Solve for $t$ to get $t= frac -341$
That gives you the point on line to be $$Q=(frac 641,frac 1841, frac -341)$$
You want to minimize$$ D^2 = (2t-6)^2+(3+6t)^2+(3-t)^2$$
Differentiate to get $$4(2t-6)+12(3+6t)-2(3-t)=0$$
Solve for $t$ to get $t= frac -341$
That gives you the point on line to be $$Q=(frac 641,frac 1841, frac -341)$$
answered 1 hour ago
Mohammad Riazi-Kermani
37.3k41957
37.3k41957
add a comment |Â
add a comment |Â
up vote
1
down vote
Let $v = (-6,3,3), u = (-2,-6,1)$
$v - frac ucdot v^2 u$
Describes a vector from a the line defined by $(0,0,0) + ut$ to the point $v$ that is orthogonal to $u.$
$|v - frac ucdot v^2 u|$ will be your distance.
$big(v - frac ucdot v^2 ubig)cdotbig(v - frac ucdot v^2 ubig) = |v|^2 - frac (ucdot v)^2^2$
Alternatively.
$d^2 = (-6+2t)^2 + (3+6t^2) + (3-t)^2\
d^2 = 54 +6t +41t^2\
d^2 = 41(t + frac 341)^2 - frac 941 + 54$
Distance is minimized when $t = -frac 341$
and
$d^2 = 54 - frac 941\
d = sqrt 54 - frac 941$
It is worth noting that
$54 = (-6,3,3)cdot(-6,3,3) = |v|^2\ -3 = (-6,3,3)cdot(-2,-6,1) = ucdot v\$
and $41 = (-2,-6,1)cdot(-2,-6,1) = |u|^2$
add a comment |Â
up vote
1
down vote
Let $v = (-6,3,3), u = (-2,-6,1)$
$v - frac ucdot v^2 u$
Describes a vector from a the line defined by $(0,0,0) + ut$ to the point $v$ that is orthogonal to $u.$
$|v - frac ucdot v^2 u|$ will be your distance.
$big(v - frac ucdot v^2 ubig)cdotbig(v - frac ucdot v^2 ubig) = |v|^2 - frac (ucdot v)^2^2$
Alternatively.
$d^2 = (-6+2t)^2 + (3+6t^2) + (3-t)^2\
d^2 = 54 +6t +41t^2\
d^2 = 41(t + frac 341)^2 - frac 941 + 54$
Distance is minimized when $t = -frac 341$
and
$d^2 = 54 - frac 941\
d = sqrt 54 - frac 941$
It is worth noting that
$54 = (-6,3,3)cdot(-6,3,3) = |v|^2\ -3 = (-6,3,3)cdot(-2,-6,1) = ucdot v\$
and $41 = (-2,-6,1)cdot(-2,-6,1) = |u|^2$
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Let $v = (-6,3,3), u = (-2,-6,1)$
$v - frac ucdot v^2 u$
Describes a vector from a the line defined by $(0,0,0) + ut$ to the point $v$ that is orthogonal to $u.$
$|v - frac ucdot v^2 u|$ will be your distance.
$big(v - frac ucdot v^2 ubig)cdotbig(v - frac ucdot v^2 ubig) = |v|^2 - frac (ucdot v)^2^2$
Alternatively.
$d^2 = (-6+2t)^2 + (3+6t^2) + (3-t)^2\
d^2 = 54 +6t +41t^2\
d^2 = 41(t + frac 341)^2 - frac 941 + 54$
Distance is minimized when $t = -frac 341$
and
$d^2 = 54 - frac 941\
d = sqrt 54 - frac 941$
It is worth noting that
$54 = (-6,3,3)cdot(-6,3,3) = |v|^2\ -3 = (-6,3,3)cdot(-2,-6,1) = ucdot v\$
and $41 = (-2,-6,1)cdot(-2,-6,1) = |u|^2$
Let $v = (-6,3,3), u = (-2,-6,1)$
$v - frac ucdot v^2 u$
Describes a vector from a the line defined by $(0,0,0) + ut$ to the point $v$ that is orthogonal to $u.$
$|v - frac ucdot v^2 u|$ will be your distance.
$big(v - frac ucdot v^2 ubig)cdotbig(v - frac ucdot v^2 ubig) = |v|^2 - frac (ucdot v)^2^2$
Alternatively.
$d^2 = (-6+2t)^2 + (3+6t^2) + (3-t)^2\
d^2 = 54 +6t +41t^2\
d^2 = 41(t + frac 341)^2 - frac 941 + 54$
Distance is minimized when $t = -frac 341$
and
$d^2 = 54 - frac 941\
d = sqrt 54 - frac 941$
It is worth noting that
$54 = (-6,3,3)cdot(-6,3,3) = |v|^2\ -3 = (-6,3,3)cdot(-2,-6,1) = ucdot v\$
and $41 = (-2,-6,1)cdot(-2,-6,1) = |u|^2$
edited 1 hour ago
answered 1 hour ago
Doug M
41.7k31751
41.7k31751
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2979814%2funderstanding-the-distance-between-a-line-and-a-point-in-3d-space%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password