The Projection of a Vector onto a PlaneFind the projection of any vector onto the linear span and the normal...

What are the G forces leaving Earth orbit?

Can a virus destroy the BIOS of a modern computer?

Do Iron Man suits sport waste management systems?

Placement of More Information/Help Icon button for Radio Buttons

Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?

Theorists sure want true answers to this!

Mathematica command that allows it to read my intentions

Is this draw by repetition?

files created then deleted at every second in tmp directory

Can compressed videos be decoded back to their uncompresed original format?

How to install cross-compiler on Ubuntu 18.04?

Should I tell management that I intend to leave due to bad software development practices?

My ex-girlfriend uses my Apple ID to log in to her iPad. Do I have to give her my Apple ID password to reset it?

Was the Stack Exchange "Happy April Fools" page fitting with the '90's code?

How obscure is the use of 令 in 令和?

What do you call someone who asks many questions?

In Bayesian inference, why are some terms dropped from the posterior predictive?

Was the old ablative pronoun "med" or "mēd"?

Processor speed limited at 0.4 Ghz

What Exploit Are These User Agents Trying to Use?

How dangerous is XSS

How many wives did king shaul have

What is required to make GPS signals available indoors?

How can a day be of 24 hours?



The Projection of a Vector onto a Plane


Find the projection of any vector onto the linear span and the normal from any vector to that spanOrthographic projection in euclidean spaceUse of GS before projecting a vector onto a planeFind an equation for the plane given vectors u and vHow to compute the projection of a vector on a planeFind the orthogonal projector of a vector onto a subspace3D Coordinates of Point based on 2D Vector on a PlaneProjection onto a plane that doesn't pass through the originvector projection onto a planeorthogonal projection of a vector onto a plane













2












$begingroup$


I want to find the orthogonal projection of the vector $vec y$ onto a plane.



I have $vec y = (1, -1, 2)$ and a plane that goes through the points
begin{align*}u_1 = (1, 0, 0) \ u_2 = (1, 1, 1) \ u_3 = (0, 0, 1)
end{align*}

I started by finding the equation for the plane by calculating: $vec{PQ} = u_2 - u_1$ and $vec{PR} = u_3 - u_1$.

I then took the cross product between $vec{PQ}$ and $vec{PR}$ and got $(1, -1, 1)$. I used the cross product as coefficients $a, b, c$ in the equation:
$$a(x - x_0) + b(y-y_0) + c(z-z_0) = 0$$



With this I got the plane equation to become $x - y + z = 1$.



Building on this, I went on to calculate the point where the vector $vec y$ intersects the plane. I used $(0, 0, 0)$ as a starting point and $(1, -1, 2)$ as the endpoint.



$$r(t) = {x_0, y_0, z_0} + t{x_1-x_0, y_1-y_0, z_1-z_0} = (t, -t, 2t)$$



I inserted these parameters into the plane equation and got $t = 1/4$.



So the vector intersects the plane in $(1/4, -1/4, 1/2)$.



Now my task is to find the projection of the vector y onto the plane. My idea was to use the point of intersection together with the cross product to find a vector that is perpendicular to the plane. By using the point of intersection as the starting point and the cross product as the endpoint.



I could subtract y with this perpendicular vector and get the endpoint for the projection of y onto the plane, while also here using the point of intersection as the starting point.



Howevever, the resulting projection is not correct. Apparently, both the starting point and the end point has to be calculated differently.



I also tried using the Gram-Schmidt process to transform the base vectors $u_1$, $u_2$, $u_3$ into an ortogonal base. With this I tried to use the equation $$vec y' = frac{vec y·u_1}{u_1·u_1}cdot u_1 + frac{vec y·u_2}{u_2·u_2}cdot u_2 + frac{vec y·u_3}{u_3·u_3}cdot u_3$$ to find the projection but a bit surprisingly arrived back at the original vector y when doing this.



Tremendously grateful for any tips.



Image of my problem:



enter image description here










share|cite|improve this question











$endgroup$












  • $begingroup$
    Please use MathJax for typesetting math.
    $endgroup$
    – StubbornAtom
    Mar 18 at 14:08










  • $begingroup$
    I have edited your question, please have a look if this reflects your original question.
    $endgroup$
    – Haris Gusic
    Mar 18 at 15:32










  • $begingroup$
    The plane doesn’t pass through the origin—it’s not a subspace of $mathbb R^3$—so applying G-S to the three vectors is nonsensical. In fact, you should end up with a basis for $mathbb R^3$! If you’re going to orthogonalize anything, it should be $overrightarrow{PQ}$ and $overrightarrow{PR}$.
    $endgroup$
    – amd
    Mar 18 at 19:33












  • $begingroup$
    It appears that you have a couple of fundamental conceptual errors here. What will you do if the vector doesn’t intersect the plane at all, say, if the plane were were $x-y+z=-1$ instead?
    $endgroup$
    – amd
    Mar 18 at 19:50
















2












$begingroup$


I want to find the orthogonal projection of the vector $vec y$ onto a plane.



I have $vec y = (1, -1, 2)$ and a plane that goes through the points
begin{align*}u_1 = (1, 0, 0) \ u_2 = (1, 1, 1) \ u_3 = (0, 0, 1)
end{align*}

I started by finding the equation for the plane by calculating: $vec{PQ} = u_2 - u_1$ and $vec{PR} = u_3 - u_1$.

I then took the cross product between $vec{PQ}$ and $vec{PR}$ and got $(1, -1, 1)$. I used the cross product as coefficients $a, b, c$ in the equation:
$$a(x - x_0) + b(y-y_0) + c(z-z_0) = 0$$



With this I got the plane equation to become $x - y + z = 1$.



Building on this, I went on to calculate the point where the vector $vec y$ intersects the plane. I used $(0, 0, 0)$ as a starting point and $(1, -1, 2)$ as the endpoint.



$$r(t) = {x_0, y_0, z_0} + t{x_1-x_0, y_1-y_0, z_1-z_0} = (t, -t, 2t)$$



I inserted these parameters into the plane equation and got $t = 1/4$.



So the vector intersects the plane in $(1/4, -1/4, 1/2)$.



Now my task is to find the projection of the vector y onto the plane. My idea was to use the point of intersection together with the cross product to find a vector that is perpendicular to the plane. By using the point of intersection as the starting point and the cross product as the endpoint.



I could subtract y with this perpendicular vector and get the endpoint for the projection of y onto the plane, while also here using the point of intersection as the starting point.



Howevever, the resulting projection is not correct. Apparently, both the starting point and the end point has to be calculated differently.



I also tried using the Gram-Schmidt process to transform the base vectors $u_1$, $u_2$, $u_3$ into an ortogonal base. With this I tried to use the equation $$vec y' = frac{vec y·u_1}{u_1·u_1}cdot u_1 + frac{vec y·u_2}{u_2·u_2}cdot u_2 + frac{vec y·u_3}{u_3·u_3}cdot u_3$$ to find the projection but a bit surprisingly arrived back at the original vector y when doing this.



Tremendously grateful for any tips.



Image of my problem:



enter image description here










share|cite|improve this question











$endgroup$












  • $begingroup$
    Please use MathJax for typesetting math.
    $endgroup$
    – StubbornAtom
    Mar 18 at 14:08










  • $begingroup$
    I have edited your question, please have a look if this reflects your original question.
    $endgroup$
    – Haris Gusic
    Mar 18 at 15:32










  • $begingroup$
    The plane doesn’t pass through the origin—it’s not a subspace of $mathbb R^3$—so applying G-S to the three vectors is nonsensical. In fact, you should end up with a basis for $mathbb R^3$! If you’re going to orthogonalize anything, it should be $overrightarrow{PQ}$ and $overrightarrow{PR}$.
    $endgroup$
    – amd
    Mar 18 at 19:33












  • $begingroup$
    It appears that you have a couple of fundamental conceptual errors here. What will you do if the vector doesn’t intersect the plane at all, say, if the plane were were $x-y+z=-1$ instead?
    $endgroup$
    – amd
    Mar 18 at 19:50














2












2








2





$begingroup$


I want to find the orthogonal projection of the vector $vec y$ onto a plane.



I have $vec y = (1, -1, 2)$ and a plane that goes through the points
begin{align*}u_1 = (1, 0, 0) \ u_2 = (1, 1, 1) \ u_3 = (0, 0, 1)
end{align*}

I started by finding the equation for the plane by calculating: $vec{PQ} = u_2 - u_1$ and $vec{PR} = u_3 - u_1$.

I then took the cross product between $vec{PQ}$ and $vec{PR}$ and got $(1, -1, 1)$. I used the cross product as coefficients $a, b, c$ in the equation:
$$a(x - x_0) + b(y-y_0) + c(z-z_0) = 0$$



With this I got the plane equation to become $x - y + z = 1$.



Building on this, I went on to calculate the point where the vector $vec y$ intersects the plane. I used $(0, 0, 0)$ as a starting point and $(1, -1, 2)$ as the endpoint.



$$r(t) = {x_0, y_0, z_0} + t{x_1-x_0, y_1-y_0, z_1-z_0} = (t, -t, 2t)$$



I inserted these parameters into the plane equation and got $t = 1/4$.



So the vector intersects the plane in $(1/4, -1/4, 1/2)$.



Now my task is to find the projection of the vector y onto the plane. My idea was to use the point of intersection together with the cross product to find a vector that is perpendicular to the plane. By using the point of intersection as the starting point and the cross product as the endpoint.



I could subtract y with this perpendicular vector and get the endpoint for the projection of y onto the plane, while also here using the point of intersection as the starting point.



Howevever, the resulting projection is not correct. Apparently, both the starting point and the end point has to be calculated differently.



I also tried using the Gram-Schmidt process to transform the base vectors $u_1$, $u_2$, $u_3$ into an ortogonal base. With this I tried to use the equation $$vec y' = frac{vec y·u_1}{u_1·u_1}cdot u_1 + frac{vec y·u_2}{u_2·u_2}cdot u_2 + frac{vec y·u_3}{u_3·u_3}cdot u_3$$ to find the projection but a bit surprisingly arrived back at the original vector y when doing this.



Tremendously grateful for any tips.



Image of my problem:



enter image description here










share|cite|improve this question











$endgroup$




I want to find the orthogonal projection of the vector $vec y$ onto a plane.



I have $vec y = (1, -1, 2)$ and a plane that goes through the points
begin{align*}u_1 = (1, 0, 0) \ u_2 = (1, 1, 1) \ u_3 = (0, 0, 1)
end{align*}

I started by finding the equation for the plane by calculating: $vec{PQ} = u_2 - u_1$ and $vec{PR} = u_3 - u_1$.

I then took the cross product between $vec{PQ}$ and $vec{PR}$ and got $(1, -1, 1)$. I used the cross product as coefficients $a, b, c$ in the equation:
$$a(x - x_0) + b(y-y_0) + c(z-z_0) = 0$$



With this I got the plane equation to become $x - y + z = 1$.



Building on this, I went on to calculate the point where the vector $vec y$ intersects the plane. I used $(0, 0, 0)$ as a starting point and $(1, -1, 2)$ as the endpoint.



$$r(t) = {x_0, y_0, z_0} + t{x_1-x_0, y_1-y_0, z_1-z_0} = (t, -t, 2t)$$



I inserted these parameters into the plane equation and got $t = 1/4$.



So the vector intersects the plane in $(1/4, -1/4, 1/2)$.



Now my task is to find the projection of the vector y onto the plane. My idea was to use the point of intersection together with the cross product to find a vector that is perpendicular to the plane. By using the point of intersection as the starting point and the cross product as the endpoint.



I could subtract y with this perpendicular vector and get the endpoint for the projection of y onto the plane, while also here using the point of intersection as the starting point.



Howevever, the resulting projection is not correct. Apparently, both the starting point and the end point has to be calculated differently.



I also tried using the Gram-Schmidt process to transform the base vectors $u_1$, $u_2$, $u_3$ into an ortogonal base. With this I tried to use the equation $$vec y' = frac{vec y·u_1}{u_1·u_1}cdot u_1 + frac{vec y·u_2}{u_2·u_2}cdot u_2 + frac{vec y·u_3}{u_3·u_3}cdot u_3$$ to find the projection but a bit surprisingly arrived back at the original vector y when doing this.



Tremendously grateful for any tips.



Image of my problem:



enter image description here







linear-algebra






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 18 at 15:30









Haris Gusic

2,821423




2,821423










asked Mar 18 at 14:04









Olof AlmqvistOlof Almqvist

183




183












  • $begingroup$
    Please use MathJax for typesetting math.
    $endgroup$
    – StubbornAtom
    Mar 18 at 14:08










  • $begingroup$
    I have edited your question, please have a look if this reflects your original question.
    $endgroup$
    – Haris Gusic
    Mar 18 at 15:32










  • $begingroup$
    The plane doesn’t pass through the origin—it’s not a subspace of $mathbb R^3$—so applying G-S to the three vectors is nonsensical. In fact, you should end up with a basis for $mathbb R^3$! If you’re going to orthogonalize anything, it should be $overrightarrow{PQ}$ and $overrightarrow{PR}$.
    $endgroup$
    – amd
    Mar 18 at 19:33












  • $begingroup$
    It appears that you have a couple of fundamental conceptual errors here. What will you do if the vector doesn’t intersect the plane at all, say, if the plane were were $x-y+z=-1$ instead?
    $endgroup$
    – amd
    Mar 18 at 19:50


















  • $begingroup$
    Please use MathJax for typesetting math.
    $endgroup$
    – StubbornAtom
    Mar 18 at 14:08










  • $begingroup$
    I have edited your question, please have a look if this reflects your original question.
    $endgroup$
    – Haris Gusic
    Mar 18 at 15:32










  • $begingroup$
    The plane doesn’t pass through the origin—it’s not a subspace of $mathbb R^3$—so applying G-S to the three vectors is nonsensical. In fact, you should end up with a basis for $mathbb R^3$! If you’re going to orthogonalize anything, it should be $overrightarrow{PQ}$ and $overrightarrow{PR}$.
    $endgroup$
    – amd
    Mar 18 at 19:33












  • $begingroup$
    It appears that you have a couple of fundamental conceptual errors here. What will you do if the vector doesn’t intersect the plane at all, say, if the plane were were $x-y+z=-1$ instead?
    $endgroup$
    – amd
    Mar 18 at 19:50
















$begingroup$
Please use MathJax for typesetting math.
$endgroup$
– StubbornAtom
Mar 18 at 14:08




$begingroup$
Please use MathJax for typesetting math.
$endgroup$
– StubbornAtom
Mar 18 at 14:08












$begingroup$
I have edited your question, please have a look if this reflects your original question.
$endgroup$
– Haris Gusic
Mar 18 at 15:32




$begingroup$
I have edited your question, please have a look if this reflects your original question.
$endgroup$
– Haris Gusic
Mar 18 at 15:32












$begingroup$
The plane doesn’t pass through the origin—it’s not a subspace of $mathbb R^3$—so applying G-S to the three vectors is nonsensical. In fact, you should end up with a basis for $mathbb R^3$! If you’re going to orthogonalize anything, it should be $overrightarrow{PQ}$ and $overrightarrow{PR}$.
$endgroup$
– amd
Mar 18 at 19:33






$begingroup$
The plane doesn’t pass through the origin—it’s not a subspace of $mathbb R^3$—so applying G-S to the three vectors is nonsensical. In fact, you should end up with a basis for $mathbb R^3$! If you’re going to orthogonalize anything, it should be $overrightarrow{PQ}$ and $overrightarrow{PR}$.
$endgroup$
– amd
Mar 18 at 19:33














$begingroup$
It appears that you have a couple of fundamental conceptual errors here. What will you do if the vector doesn’t intersect the plane at all, say, if the plane were were $x-y+z=-1$ instead?
$endgroup$
– amd
Mar 18 at 19:50




$begingroup$
It appears that you have a couple of fundamental conceptual errors here. What will you do if the vector doesn’t intersect the plane at all, say, if the plane were were $x-y+z=-1$ instead?
$endgroup$
– amd
Mar 18 at 19:50










2 Answers
2






active

oldest

votes


















0












$begingroup$

I think some confusion might have come from the way Mathematica creates a 2D plane out of the two given points.



By using that a vector that passes through a plane (y) can be broken down into the sum of a vector (normal) orthogonal to the plane (n) and a vector that runs parallell to the plane and is a projection (x).



y = n + x



(1, -1, 2) = (1, -1, 1) + (a, b, c)



Projection = Vektor - VektorNormal



Projection = (0, 0, 1)



I used this and calculated where the VektorNormal intersects the plane and used that as the starting point for the projection.



It seems reasonable that it could work and it looks like it might do the trick.



Although far from as elegant as Haris Gusic's calculations.



Proposed Solution, Geometrically






share|cite|improve this answer









$endgroup$













  • $begingroup$
    I would say that the confusion lay not in Mathematica, but in your trying to start from the intersection of the vector and plane, which might not even exist in the first place. The correct “starting point,” as you put it, is where a line through the origin normal to the plane intersects it, i.e., from the closed point on the plane to the origin.
    $endgroup$
    – amd
    Mar 18 at 19:58










  • $begingroup$
    I see. Thanks a lot for your great answers amd.
    $endgroup$
    – Olof Almqvist
    Mar 19 at 13:05



















0












$begingroup$

It looks like you’ve corrected the fundamental conceptual error that you were making in trying to find where $vec y$ (really the line segment from the origin to $vec y$) intersects the plane. That line of attack is suspect since there’s no a priori reason to believe that this intersection even exists.



However, once you’ve found an equation for the plane, the orthogonal projection of $vec y$ onto this plane can be computed directly: it’s simply the foot of the perpendicular from $vec y$ to the plane. A simple way to compute this point is to substitute $vec y+tvec n$, where $vec n$ is normal to the plane, into the equation of the plane, and then solve for $t$: $$(1+t)-(-1-t)+(2+t)-1 = 3t+3 = 0,$$ so $t=-1$ and the orthogonal projection of $vec y$ onto the plane is $(0,0,1)$.



You can instead compute the projection without finding an implicit Cartesian equation for the plane or even computing its normal by using the fact that the orthogonal projection of $vec y$ onto the plane is the nearest point on the plane to $vec y$. The plane can be parameterized by the affine combination $$vec r(alpha,beta)=alpha u_1+beta u_2+(1-alpha-beta)u_3 = (alpha+beta,beta,1-alpha).$$ Minimizing the distance between $vec y$ and $vec r$ is equivalent to minimizing the square of the distance, namely $$(alpha+beta-1)^2+(beta+1)^2+(1-alpha-2)^2 = 2alpha^2+2alphabeta+2beta^2+3=frac12(alpha-beta)^2+frac32(alpha+beta)^2+3,$$ from which it’s obvious that the minimum is attained when $alpha=beta=0$, i.e., that the closest point to $vec y$ is $(0,0,1)$.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    In Mathematica you can use the Minimize function on $|vec y-vec r|^2$ to compute $alpha$ and $beta$.
    $endgroup$
    – amd
    Mar 18 at 21:38














Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3152828%2fthe-projection-of-a-vector-onto-a-plane%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0












$begingroup$

I think some confusion might have come from the way Mathematica creates a 2D plane out of the two given points.



By using that a vector that passes through a plane (y) can be broken down into the sum of a vector (normal) orthogonal to the plane (n) and a vector that runs parallell to the plane and is a projection (x).



y = n + x



(1, -1, 2) = (1, -1, 1) + (a, b, c)



Projection = Vektor - VektorNormal



Projection = (0, 0, 1)



I used this and calculated where the VektorNormal intersects the plane and used that as the starting point for the projection.



It seems reasonable that it could work and it looks like it might do the trick.



Although far from as elegant as Haris Gusic's calculations.



Proposed Solution, Geometrically






share|cite|improve this answer









$endgroup$













  • $begingroup$
    I would say that the confusion lay not in Mathematica, but in your trying to start from the intersection of the vector and plane, which might not even exist in the first place. The correct “starting point,” as you put it, is where a line through the origin normal to the plane intersects it, i.e., from the closed point on the plane to the origin.
    $endgroup$
    – amd
    Mar 18 at 19:58










  • $begingroup$
    I see. Thanks a lot for your great answers amd.
    $endgroup$
    – Olof Almqvist
    Mar 19 at 13:05
















0












$begingroup$

I think some confusion might have come from the way Mathematica creates a 2D plane out of the two given points.



By using that a vector that passes through a plane (y) can be broken down into the sum of a vector (normal) orthogonal to the plane (n) and a vector that runs parallell to the plane and is a projection (x).



y = n + x



(1, -1, 2) = (1, -1, 1) + (a, b, c)



Projection = Vektor - VektorNormal



Projection = (0, 0, 1)



I used this and calculated where the VektorNormal intersects the plane and used that as the starting point for the projection.



It seems reasonable that it could work and it looks like it might do the trick.



Although far from as elegant as Haris Gusic's calculations.



Proposed Solution, Geometrically






share|cite|improve this answer









$endgroup$













  • $begingroup$
    I would say that the confusion lay not in Mathematica, but in your trying to start from the intersection of the vector and plane, which might not even exist in the first place. The correct “starting point,” as you put it, is where a line through the origin normal to the plane intersects it, i.e., from the closed point on the plane to the origin.
    $endgroup$
    – amd
    Mar 18 at 19:58










  • $begingroup$
    I see. Thanks a lot for your great answers amd.
    $endgroup$
    – Olof Almqvist
    Mar 19 at 13:05














0












0








0





$begingroup$

I think some confusion might have come from the way Mathematica creates a 2D plane out of the two given points.



By using that a vector that passes through a plane (y) can be broken down into the sum of a vector (normal) orthogonal to the plane (n) and a vector that runs parallell to the plane and is a projection (x).



y = n + x



(1, -1, 2) = (1, -1, 1) + (a, b, c)



Projection = Vektor - VektorNormal



Projection = (0, 0, 1)



I used this and calculated where the VektorNormal intersects the plane and used that as the starting point for the projection.



It seems reasonable that it could work and it looks like it might do the trick.



Although far from as elegant as Haris Gusic's calculations.



Proposed Solution, Geometrically






share|cite|improve this answer









$endgroup$



I think some confusion might have come from the way Mathematica creates a 2D plane out of the two given points.



By using that a vector that passes through a plane (y) can be broken down into the sum of a vector (normal) orthogonal to the plane (n) and a vector that runs parallell to the plane and is a projection (x).



y = n + x



(1, -1, 2) = (1, -1, 1) + (a, b, c)



Projection = Vektor - VektorNormal



Projection = (0, 0, 1)



I used this and calculated where the VektorNormal intersects the plane and used that as the starting point for the projection.



It seems reasonable that it could work and it looks like it might do the trick.



Although far from as elegant as Haris Gusic's calculations.



Proposed Solution, Geometrically







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Mar 18 at 16:23









Olof AlmqvistOlof Almqvist

183




183












  • $begingroup$
    I would say that the confusion lay not in Mathematica, but in your trying to start from the intersection of the vector and plane, which might not even exist in the first place. The correct “starting point,” as you put it, is where a line through the origin normal to the plane intersects it, i.e., from the closed point on the plane to the origin.
    $endgroup$
    – amd
    Mar 18 at 19:58










  • $begingroup$
    I see. Thanks a lot for your great answers amd.
    $endgroup$
    – Olof Almqvist
    Mar 19 at 13:05


















  • $begingroup$
    I would say that the confusion lay not in Mathematica, but in your trying to start from the intersection of the vector and plane, which might not even exist in the first place. The correct “starting point,” as you put it, is where a line through the origin normal to the plane intersects it, i.e., from the closed point on the plane to the origin.
    $endgroup$
    – amd
    Mar 18 at 19:58










  • $begingroup$
    I see. Thanks a lot for your great answers amd.
    $endgroup$
    – Olof Almqvist
    Mar 19 at 13:05
















$begingroup$
I would say that the confusion lay not in Mathematica, but in your trying to start from the intersection of the vector and plane, which might not even exist in the first place. The correct “starting point,” as you put it, is where a line through the origin normal to the plane intersects it, i.e., from the closed point on the plane to the origin.
$endgroup$
– amd
Mar 18 at 19:58




$begingroup$
I would say that the confusion lay not in Mathematica, but in your trying to start from the intersection of the vector and plane, which might not even exist in the first place. The correct “starting point,” as you put it, is where a line through the origin normal to the plane intersects it, i.e., from the closed point on the plane to the origin.
$endgroup$
– amd
Mar 18 at 19:58












$begingroup$
I see. Thanks a lot for your great answers amd.
$endgroup$
– Olof Almqvist
Mar 19 at 13:05




$begingroup$
I see. Thanks a lot for your great answers amd.
$endgroup$
– Olof Almqvist
Mar 19 at 13:05











0












$begingroup$

It looks like you’ve corrected the fundamental conceptual error that you were making in trying to find where $vec y$ (really the line segment from the origin to $vec y$) intersects the plane. That line of attack is suspect since there’s no a priori reason to believe that this intersection even exists.



However, once you’ve found an equation for the plane, the orthogonal projection of $vec y$ onto this plane can be computed directly: it’s simply the foot of the perpendicular from $vec y$ to the plane. A simple way to compute this point is to substitute $vec y+tvec n$, where $vec n$ is normal to the plane, into the equation of the plane, and then solve for $t$: $$(1+t)-(-1-t)+(2+t)-1 = 3t+3 = 0,$$ so $t=-1$ and the orthogonal projection of $vec y$ onto the plane is $(0,0,1)$.



You can instead compute the projection without finding an implicit Cartesian equation for the plane or even computing its normal by using the fact that the orthogonal projection of $vec y$ onto the plane is the nearest point on the plane to $vec y$. The plane can be parameterized by the affine combination $$vec r(alpha,beta)=alpha u_1+beta u_2+(1-alpha-beta)u_3 = (alpha+beta,beta,1-alpha).$$ Minimizing the distance between $vec y$ and $vec r$ is equivalent to minimizing the square of the distance, namely $$(alpha+beta-1)^2+(beta+1)^2+(1-alpha-2)^2 = 2alpha^2+2alphabeta+2beta^2+3=frac12(alpha-beta)^2+frac32(alpha+beta)^2+3,$$ from which it’s obvious that the minimum is attained when $alpha=beta=0$, i.e., that the closest point to $vec y$ is $(0,0,1)$.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    In Mathematica you can use the Minimize function on $|vec y-vec r|^2$ to compute $alpha$ and $beta$.
    $endgroup$
    – amd
    Mar 18 at 21:38


















0












$begingroup$

It looks like you’ve corrected the fundamental conceptual error that you were making in trying to find where $vec y$ (really the line segment from the origin to $vec y$) intersects the plane. That line of attack is suspect since there’s no a priori reason to believe that this intersection even exists.



However, once you’ve found an equation for the plane, the orthogonal projection of $vec y$ onto this plane can be computed directly: it’s simply the foot of the perpendicular from $vec y$ to the plane. A simple way to compute this point is to substitute $vec y+tvec n$, where $vec n$ is normal to the plane, into the equation of the plane, and then solve for $t$: $$(1+t)-(-1-t)+(2+t)-1 = 3t+3 = 0,$$ so $t=-1$ and the orthogonal projection of $vec y$ onto the plane is $(0,0,1)$.



You can instead compute the projection without finding an implicit Cartesian equation for the plane or even computing its normal by using the fact that the orthogonal projection of $vec y$ onto the plane is the nearest point on the plane to $vec y$. The plane can be parameterized by the affine combination $$vec r(alpha,beta)=alpha u_1+beta u_2+(1-alpha-beta)u_3 = (alpha+beta,beta,1-alpha).$$ Minimizing the distance between $vec y$ and $vec r$ is equivalent to minimizing the square of the distance, namely $$(alpha+beta-1)^2+(beta+1)^2+(1-alpha-2)^2 = 2alpha^2+2alphabeta+2beta^2+3=frac12(alpha-beta)^2+frac32(alpha+beta)^2+3,$$ from which it’s obvious that the minimum is attained when $alpha=beta=0$, i.e., that the closest point to $vec y$ is $(0,0,1)$.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    In Mathematica you can use the Minimize function on $|vec y-vec r|^2$ to compute $alpha$ and $beta$.
    $endgroup$
    – amd
    Mar 18 at 21:38
















0












0








0





$begingroup$

It looks like you’ve corrected the fundamental conceptual error that you were making in trying to find where $vec y$ (really the line segment from the origin to $vec y$) intersects the plane. That line of attack is suspect since there’s no a priori reason to believe that this intersection even exists.



However, once you’ve found an equation for the plane, the orthogonal projection of $vec y$ onto this plane can be computed directly: it’s simply the foot of the perpendicular from $vec y$ to the plane. A simple way to compute this point is to substitute $vec y+tvec n$, where $vec n$ is normal to the plane, into the equation of the plane, and then solve for $t$: $$(1+t)-(-1-t)+(2+t)-1 = 3t+3 = 0,$$ so $t=-1$ and the orthogonal projection of $vec y$ onto the plane is $(0,0,1)$.



You can instead compute the projection without finding an implicit Cartesian equation for the plane or even computing its normal by using the fact that the orthogonal projection of $vec y$ onto the plane is the nearest point on the plane to $vec y$. The plane can be parameterized by the affine combination $$vec r(alpha,beta)=alpha u_1+beta u_2+(1-alpha-beta)u_3 = (alpha+beta,beta,1-alpha).$$ Minimizing the distance between $vec y$ and $vec r$ is equivalent to minimizing the square of the distance, namely $$(alpha+beta-1)^2+(beta+1)^2+(1-alpha-2)^2 = 2alpha^2+2alphabeta+2beta^2+3=frac12(alpha-beta)^2+frac32(alpha+beta)^2+3,$$ from which it’s obvious that the minimum is attained when $alpha=beta=0$, i.e., that the closest point to $vec y$ is $(0,0,1)$.






share|cite|improve this answer











$endgroup$



It looks like you’ve corrected the fundamental conceptual error that you were making in trying to find where $vec y$ (really the line segment from the origin to $vec y$) intersects the plane. That line of attack is suspect since there’s no a priori reason to believe that this intersection even exists.



However, once you’ve found an equation for the plane, the orthogonal projection of $vec y$ onto this plane can be computed directly: it’s simply the foot of the perpendicular from $vec y$ to the plane. A simple way to compute this point is to substitute $vec y+tvec n$, where $vec n$ is normal to the plane, into the equation of the plane, and then solve for $t$: $$(1+t)-(-1-t)+(2+t)-1 = 3t+3 = 0,$$ so $t=-1$ and the orthogonal projection of $vec y$ onto the plane is $(0,0,1)$.



You can instead compute the projection without finding an implicit Cartesian equation for the plane or even computing its normal by using the fact that the orthogonal projection of $vec y$ onto the plane is the nearest point on the plane to $vec y$. The plane can be parameterized by the affine combination $$vec r(alpha,beta)=alpha u_1+beta u_2+(1-alpha-beta)u_3 = (alpha+beta,beta,1-alpha).$$ Minimizing the distance between $vec y$ and $vec r$ is equivalent to minimizing the square of the distance, namely $$(alpha+beta-1)^2+(beta+1)^2+(1-alpha-2)^2 = 2alpha^2+2alphabeta+2beta^2+3=frac12(alpha-beta)^2+frac32(alpha+beta)^2+3,$$ from which it’s obvious that the minimum is attained when $alpha=beta=0$, i.e., that the closest point to $vec y$ is $(0,0,1)$.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Mar 18 at 21:40

























answered Mar 18 at 21:31









amdamd

31.5k21052




31.5k21052












  • $begingroup$
    In Mathematica you can use the Minimize function on $|vec y-vec r|^2$ to compute $alpha$ and $beta$.
    $endgroup$
    – amd
    Mar 18 at 21:38




















  • $begingroup$
    In Mathematica you can use the Minimize function on $|vec y-vec r|^2$ to compute $alpha$ and $beta$.
    $endgroup$
    – amd
    Mar 18 at 21:38


















$begingroup$
In Mathematica you can use the Minimize function on $|vec y-vec r|^2$ to compute $alpha$ and $beta$.
$endgroup$
– amd
Mar 18 at 21:38






$begingroup$
In Mathematica you can use the Minimize function on $|vec y-vec r|^2$ to compute $alpha$ and $beta$.
$endgroup$
– amd
Mar 18 at 21:38




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3152828%2fthe-projection-of-a-vector-onto-a-plane%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Nidaros erkebispedøme

Birsay

Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?