Point projection via matrices

The 3x3 matrix Proj = eye(3) - [P_1;P_2;1][u_1 u_2 0]/dot(u,P) gives the point projection from projection point P=(P_1,P_2) onto the line through the origin with normal u=[u_1;u_2], in homogeneous coordinates.

Information: Point projection via matrices