To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
The technical storage or access that is used exclusively for statistical purposes.
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
3 Responses
No need for fancy geometry here-just a projection. Let v = c − b be the direction of BC. Any point on the line BC looks like b + t v, so the foot H is h = b + t v with AH ⟂ BC, i.e., (a − h)·v = 0. Plugging h in gives (a − b − t v)·v = 0, so t = ((a − b)·v)/(v·v). That’s the whole story, so the position vector is h = b + ((a − b)·(c − b))/||c − b||^2 · (c − b). If you prefer anchoring at C, the same thing is h = c + ((a − c)·(b − c))/||b − c||^2 · (b − c). Hope this helps!
Let me go step by step and keep the geometry in view.
Goal
We want the position vector h of the foot H of the altitude from A to the line BC, given the position vectors a, b, c of A, B, C.
Key idea
H lies on the line through B and C, and the vector AH is perpendicular to BC. Equivalently, H is the orthogonal projection of A onto the line BC.
Parameterize the line BC
Any point on BC can be written as
h = b + t (c − b)
for some real number t. Our job is to find t.
Use the perpendicularity condition
Since AH is perpendicular to BC, we have
(a − h) · (c − b) = 0.
Substitute h = b + t(c − b):
(a − [b + t(c − b)]) · (c − b) = 0
=> (a − b − t(c − b)) · (c − b) = 0
=> (a − b) · (c − b) − t (c − b) · (c − b) = 0.
Solve for t:
t = [(a − b) · (c − b)] / [(c − b) · (c − b)].
Conclusion: the foot of the altitude
Plugging back gives
h = b + [(a − b) · (c − b)] / [(c − b) · (c − b)] · (c − b).
This is exactly “start at B and move along the direction BC by the amount equal to the projection of A−B onto BC.” In projection notation,
proj_{c−b}(a−b) = ((a−b)·(c−b))/((c−b)·(c−b)) · (c−b),
so H = B + proj_{c−b}(A−B).
Equivalent form using C as the base point
You can also write
h = c + [(a − c) · (b − c)] / [(b − c) · (b − c)] · (b − c).
Checks and remarks
– If A already lies on the line BC, then a − b is a scalar multiple of c − b. The formula gives exactly that multiple for t, and h = a as expected.
– If B = C (degenerate side), the denominator is zero and the altitude is undefined, which matches the geometry.
– The formula works in any dimension where dot products make sense; nothing here requires 2D specifically.
So the compact answer is:
h = b + ((a − b) · (c − b)) / ||c − b||^2 · (c − b).
Think of H as the “shadow” of A dropped perpendicularly onto the line through B and C – that’s just the orthogonal projection of A onto the line BC. If we set d = c − b, then every point on the line BC looks like b + t d. We want AH to be perpendicular to BC, so (a − (b + t d)) · d = 0. Solving gives t = ((a − b) · d) / (d · d).
So the position vector of the foot is
h = b + ((a − b) · (c − b)) / ||c − b||^2 · (c − b).
This works whether H lands between B and C or on the extension (for an obtuse triangle). It’s exactly the vector projection idea: BH = proj_{BC}(BA). If you want a refresher on projections, here’s a clear walkthrough: https://www.khanacademy.org/math/precalculus/x9e81a4f98389efdf:vectors-precalc/x9e81a4f98389efdf:proj-of-vectors/a/vector-projections
Hope this helps!