Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

). To find the Point where 2 lines intersect, is there any simpler method than this?

http://en.wikipedia.org/wiki/Line-line_intersection

For example could you use the equation of the line? (y = mx + b)

Another question: what would happen if I use Determinants for 2 lines that never intersect? (parallel lines). I think I should mention that I intend to do this calculation in a programming language (AS3).

I suppose that those determinants will return something along the lines of division by zero / +/- infinity for parallel lines. I didn't try it yet ::- D. Still trying to figure out the best way to get the intersection point. Determinants or... do you know another method?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

well you probably want to include vertical lines, so you should have a system of the form $a_1x+b_1y=c_1, a_2x+b_2y=c_2$. if $a_1b_2-a_2b_1=0$ you have parallel (or identical) lines. else return the point of intersection, which is $$ (x,y)=\Big(\frac{c_1b_2-b_1c_2}{a_1b_2-b_1a_2},\frac{a_1c_2-c_1a_2}{a_1b_2-b_1a_2}\Big). $$ for instance using cramer's rule. in general, you should take linear algebra at some point if you haven't. you will need it.

share|improve this answer
    
I took it 10 years ago but I forgot all of it laugh ::- D. –  Axonn Mar 5 '11 at 18:10

What about a system of linear equations? Like $$\begin{aligned}y&=m_1x+b_1\\y&=m_2x+b_2\end{aligned}$$ I actually thought you learn to do this kind of stuff at school... at least I did.

And determinants are just a result because you use an equation system. If there's no solution, you're right, the determinants get zero and if you have to divide it gets infinit at some point. But that could simply be checked with an if statement.

share|improve this answer
    
It's been a long time since school, heeheh ::- D. –  Axonn Mar 5 '11 at 17:58
    
And using the system, how would I know if the lines intersect or not? –  Axonn Mar 5 '11 at 18:09
    
As I said: if the determinant is zero, there's no solution, so they don't intersect. That's exactly if $m_1b_2-m_2b_1=0$. Actually the answer above is just the "explicit" solution using those determinants according to Cramer's rule. –  user7832 Mar 6 '11 at 11:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.