Distance to a Line

L through origin  ·  p ∈ L  ·  dist(v, p)

Coordinates
v
p

Click on line L to place p

Legend
v (vector)
L (line through origin)
L⊥ (orthogonal complement)
p (point on L)
segment pv (distance)
angle ∠(L, pv)

Click on L to place p, then drag to slide it along L
Drag to move v  ·  Drag to rotate L
Near the closest point → magnetic snap