Question: How to find coordinates of the projection of a point on the line in 3D?

I am trying to find coodinates projection H(x,y, z)  of the point P :=<x3, y3, z3> on the line AB, where A:= <x1,y1,z1>, B:= <x2,y2,z2>. I tried

restart:
with(LinearAlgebra); 
A:= <x1,y1,z1>:
B:= <x2,y2,z2>:
P :=<x3, y3, z3>:
H:=<x,y,z>;
solve([DotProduct(B-A, H-P, conjugate = false) = 0, B-A = k*(H-A)], [x, y, z, k]);

I can not get the result. How can I get the coordinates of the point H?

 

Please Wait...