# What is simpler way to find projection of a point on a plane?

This is my code to find the coordinate of projection of the point pA = {2, 3, 5} on the plane -284 + 14 x + 2 y + 5 z == 0.

Clear["Global*"]
pA = {2, 3, 5};
myP = -284 + 14 x + 2 y + 5 z;
{x, y, z} /.
Solve[{x == pA[[1]] + Coefficient[myP, x] t,
y == pA[[2]] + Coefficient[myP, y] t,
z == pA[[3]] + Coefficient[myP, z] t, myP == 0}, {x, y, z, t}, Reals]


{{16, 5, 10}}

What is simpler way to find the projection of a point on a plane?

RegionNearest[ImplicitRegion[myP == 0, {x, y, z}]]@pA


{16, 5, 10}

Clear["Global*"]
pA = {2, 3, 5};
myP = -284 + 14 x + 2 y + 5 z;


The normal vector to the plane is:

Coefficient[myP, {x, y, z}]


{14, 2, 5}

The line that passes through the point pA and is parallel to the normal vector is given by:

line = Coefficient[myP, {x, y, z}] t + pA


{2 + 14 t, 3 + 2 t, 5 + 5 t}

For Mathematica processing, convert to rules:

pline = Thread[{x, y, z} -> line]


{x -> 2 + 14 t, y -> 3 + 2 t, z -> 5 + 5 t}

To find where the parametric line intersects the plane (i.e., closest point), solve for t:

sol = First@(myP == 0 /. pline // Solve[#, t] &)

{t -> 1}


res = line /. sol


{16, 5, 10}

• Thank you very much for your explanation. My way is similar to your way. Commented Mar 11 at 14:46