#### Archived

This topic is now archived and is closed to further replies.

# the math challenge

This topic is 6359 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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.

##### Share on other sites

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

##### Share on other sites
thanks alot. I had a little brain fart I guess.

##### Share on other sites
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

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633767
• Total Posts
3013739
×