the math challenge

Started by
3 comments, last by Pseudo 22 years, 9 months ago
I have 2 2d line equations in general form (Ax+By+C=0) and I would like to find the point of intersection (if any). How can I do this? I started to write it out on paper and gave up because I would have had to simplify a huge equation. I know there is a simple solution, so if you are man(or women) enough to take the math challenge, please post what you think is the quickest solution. Pseudo
Advertisement
Lets say we have two lines:

y = mx + b

y = 3x + 3
y = 4x + 1

To find the point of intersection we arrange them like this:

x + y = b

-3x + y = 3
-4x + y = 1

This is a systems of equation. What we have to do is have either the x or the y on the top and bottom being the inverse value. So lets use the x:

12x - 4y = -12
-12x + 3y = 3

All I did was multiply the top by - 3, and the bottom by + 3. This gives us an equation we can solve. We now cross of the zeroing xs, add the ys and add the ending term:

0x - 1y = -9
-1y = -9
y = 9

Now to find the x point, we take a line and substitute in for y and solve for x.

9 = 3x + 3
6 = 3x
2 = x

(2, 9) is the point of intersection for the two lines defined by: y = 3x + 3, y = 4x + 1. Hope this helped. I did this based on memory so I''m not sure if it is all entirely correct.

"The time has come", the Walrus said, "To speak of many things."

I''d rewrite each formula so that a single variable (x or y) was on one side. I will pick y:Ax + By + C = 0By = -Ax - Cy = -Ax/B - C/B   (y=mx+b format)Do that for each line, then set the y of one line = to the y of the other line, so you will get something like:4x + 5 = 5x + 3Then solve for x:5 - 3 = 5x - 4x2 = x 





thanks alot. I had a little brain fart I guess.
Yeah, those are the two easiest ways to do it. If you have more than 2 equations, the same thing goes, only for n equations, you must have n variables to solve.


Got Slack?
Commander M

This topic is closed to new replies.

Advertisement