1) find the point of intersection Q(x,y) of L1: 2x+y=7 and L2: 5x-2y=4 :
1.1) transform either L1 or L2 so that it looks like y = or x =
example L1:
x = ( 7 - y ) / 2 OR y = 7 - 2x
1.2) substitute either x or y into the other line ( in case of the example above L2):
substitute the transformed y of L1 into L2 and transform until you have x = :
L1: y = 7 - 2x L2: 5x-2y=4 :
L2: 5x - 2(7 -2x) = 4
L2: 5x -14 +4x = 4
L2: 9x = 18
L2: x = 2
You now know Q(2,?).
1.3) now you only need to place the result into L2 to get y:
L2: 5*2 - 2y = 4
L2: -2y = 4 - 10
L2: -2y = -6
L2 : y = 3
Now you know Q(2,3)
2) You have 2 points P(1,2) and Q(2,3). Now you need the length of the vector PQ. Length of the vector PQ is the distance between P and Q.
The vector PQ(x,y) is calculated like this: PQx = Qx - Px and PQy = Qy - Py.
In the example P(1,2) and Q(2,3): PQx = 2 - 1 = 1 and PQy = 3 - 2 = 1 -> the vector PQ(1,1).
The length (distance) from P to Q is calculated with Pythagoras a² + b² = c².
In this example x² + y² = distance_between_P_and_Q² so the distance between P and Q is the square root of (1² + 1²).