Exercise 1: Line-Line Intersection of Two Diagonals — Possible Solution ==================================================================== SETTING UP THE PROBLEM ------------------------------ Line 1 passes through P1=(1,1) and P2=(5,5) - this is the line y=x. Line 2 passes through P3=(1,5) and P4=(5,1) - this is the line y = -x + 6 (it descends from (1,5) to (5,1)). SOLVING GEOMETRICALLY FIRST, AS A SANITY CHECK ------------------------------ Setting the two line equations equal: x = -x + 6, so 2x = 6, x = 3, and since y=x, y=3 as well. The expected intersection point is (3,3). APPLYING THIS CHAPTER'S OWN FORMULA ------------------------------ Using x1=1,y1=1, x2=5,y2=5, x3=1,y3=5, x4=5,y4=1: denom = (x1-x2)(y3-y4) - (y1-y2)(x3-x4) = (1-5)(5-1) - (1-5)(1-5) = (-4)(4) - (-4)(-4) = -16 - 16 = -32 t = [(x1-x3)(y3-y4) - (y1-y3)(x3-x4)] / denom = [(1-1)(5-1) - (1-5)(1-5)] / -32 = [0 - 16] / -32 = -16 / -32 = 0.5 intersection = (x1 + t*(x2-x1), y1 + t*(y2-y1)) = (1 + 0.5*(5-1), 1 + 0.5*(5-1)) = (1 + 2, 1 + 2) = (3, 3) RESULT ------------------------------ The intersection point is (3, 3), matching the independent geometric sanity check exactly. WHY THIS WORKS AS AN ANSWER ------------------------------ The answer solves the problem two independent ways - once via simple geometric reasoning about the two lines' own equations, and once by mechanically applying this chapter's own formula step by step - and confirms both arrive at the identical result, rather than presenting only the formula's output without any independent check.