Foot of a perpendicular with vectors?

I’m prepping for a test and I keep blanking on how to get the foot of the perpendicular from P onto line AB using vectors. For example A=(1,2), B=(5,3), P=(2,7)-what’s the vector-y way to do this (or am I overthinking it)?

3 Responses

  1. Use the orthogonal projection onto the direction of the line. Let v = B − A and t = ((P − A) · v)/(v · v); then the foot F is A + t v. Here A = (1,2), B = (5,3), P = (2,7). So v = (4,1) and P − A = (1,5). Compute the dot products: (P − A) · v = 1·4 + 5·1 = 9, and v · v = 4^2 + 1^2 = 17, so t = 9/17. Therefore F = A + (9/17)v = (1,2) + (9/17)(4,1) = (1 + 36/17, 2 + 9/17) = (53/17, 43/17). Quick check: F − P is proportional to (1, −4), which is perpendicular to v = (4,1), so it’s consistent. Hope this helps!

  2. Love this question! When I think “foot of the perpendicular,” I imagine dropping the shadow of point P onto the line through A and B, using the direction the line is already pointing. Vectors make this super clean: you just slide along the line by exactly the right amount.

    Here’s the vector recipe
    – Direction of the line: v = B − A
    – From A to your point: w = P − A
    – How far to slide along the line (the “dimmer switch”): t = (w · v) / (v · v)
    – Foot of the perpendicular (the point on the line): F = A + t v

    Why this works: You’re projecting w onto v. The projection tells you exactly how much of w points along the line, and that’s where the foot lands.

    Now let’s do your example
    – A = (1, 2), B = (5, 3), P = (2, 7)
    – v = B − A = (5 − 1, 3 − 2) = (4, 1)
    – w = P − A = (2 − 1, 7 − 2) = (1, 5)
    – Dot products: w · v = 1·4 + 5·1 = 9, and v · v = 4² + 1² = 17
    – So t = 9/17
    – Foot: F = A + t v = (1, 2) + (9/17)(4, 1)
    = (1 + 36/17, 2 + 9/17)
    = (53/17, 43/17)

    That’s the point on the line AB closest to P.

    Quick check (for peace of mind!)
    The vector from F to P should be perpendicular to v = AB.
    – PF = F − P = (53/17 − 2, 43/17 − 7) = (19/17, −76/17)
    – v · PF = (4, 1) · (19/17, −76/17) = (76 − 76)/17 = 0
    Perfect: perpendicular!

    Notes and extras
    – If you care about the foot on the segment AB (not the whole line), check t:
    – If 0 ≤ t ≤ 1, it’s on the segment.
    – If t < 0, the closest point on the segment is A. - If t > 1, the closest point on the segment is B.
    – Same formula works in any dimension. Just keep your dot products handy.

    So the vector-y way is: project (P − A) onto (B − A), then add to A. In your example, the foot is F = (53/17, 43/17).

Leave a Reply

Your email address will not be published. Required fields are marked *

Join Our Community

Ready to make maths more enjoyable, accessible, and fun? Join a friendly community where you can explore puzzles, ask questions, track your progress, and learn at your own pace.

By becoming a member, you unlock:

  • Access to all community puzzles
  • The Forum for asking and answering questions
  • Your personal dashboard with points & achievements
  • A supportive space built for every level of learner
  • New features and updates as the Hub grows