Solve the two equations using method of elimination.
a1x+b1y+c1=0
a2x+b2y+c2=0
x = (b1c2−b2c1)(a1b2−a2b1), y = (c1a2−c2a1)(a1b2−a2b1)
Given two equations are
a1x+b1y+c1=0
and a2x+b2y+c2=0
On multiplying the first equation by b2 and second equation by b1, we get
b2a1x + b2b1y + b2c1 = 0
b1a2x + b1b2y + b1c2 = 0
On subtracting these two equations, we get
(b2a1–b1a2)x+(b2b1–b1b2)y+(b2c1–b1c2)=0
i.e., (b2a1 – b1a2)x = b1c2 – b2c1
Therefore x=(b1c2−b2c1)(a1b2−a2b1) ,
On substituting the value of x in equation (1), we get
a1(b1c2−b2c1a1b2−a2b1)+b1y+c1=0
⇒b1y=−c1−a1(b1c2−b2c1a1b2−a2b1)
⇒b1y=−c1(a1b2−a2b1)−a1(b1c2−b2c1)a1b2−a2b1
⇒y=b1×(c1a2−c2a1)b1×(a1b2−a2b1)
⇒y=(c1a2−c2a1)(a1b2−a2b1)