mindstalk: Tohsaka Rin (Rin)
This was something covered in pre-calculus, way back in 7th grade. Like most of precalc, it didn't leave a deep conscious impression on me. Or much of any impression, in this case. In my new hobby of revisiting math fundamentals, largely in bed, I tried to figure it out in my head, got annoyed, and looked it up. The formula isn't bad, though not one I was working toward (it uses Ax+By+C=0 lines, I was using y=mx+b), but the proofs I saw were pretty grotty. I came up with a new one I like more.

Simplify! Skipping the *really* simple stages, of horizontal and vertical lines, what's the distance from a line to the origin? Combining the two representations, the line is y=-Ax/B -C/B. A perpendicular line from the origin is y=Bx/A. Via algebra, he point of intersection is x=CA/(A^2+B^2), y=CB/(A^2+B^2). The distance from that to the origin is |C|/sqrt(A^2+B^2). (Adding |absolute value| because distances must be positive, also this C is actually a square root of C^2 from the Euclidean distance formula, so of course pick the positive root.)

Now, given a line and some other point (X,Y), we just have to translate the system so the point coincides with the origin. This turns the line into A(x-(-X))+B(y-(-Y))+C= Ax+AX+By+BY+C=Ax+By+(AX+BY+C)=0 Applying the previous result, the distance is |AX+BY+C|/sqrt(A^2+B^2). Voila!

I need a math icon.

Date: 2016-06-28 20:02 (UTC)From: [personal profile] mtbc
mtbc: photograph of me (Default)
It's interesting to see your sensible algebraic approach. I don't recall ever having done that; approaching it now, I would probably do something with cross and dot products.

Profile

mindstalk: (Default)
mindstalk

May 2025

S M T W T F S
    123
45678910
11 121314151617
1819202122 23 24
25262728293031

Page Summary

Most Popular Tags

Expand Cut Tags

No cut tags

Style Credit

Page generated 2025-05-31 15:46
Powered by Dreamwidth Studios