Linear Algebra and Its Applications · Problem 3.3.21
Orthogonality — Gilbert Strang
Mathematics · closest-points-on-lines
Problem
Suppose L1 is the line through the origin in the direction of a1 and L2 is the line through b in the direction of a2. To find the closest points x1a1 and b+x2a2 on the two lines, write the two equations for the x1 and x2 that minimize ∥x1a1−x2a2−b∥. Solve for x if a1=(1,1,0), a2=(0,1,0), b=(2,1,4).