Problems solved in full
-
The distance from the origin to the line 4x − 3y = 1 7 steps
The tool prints the line through A and B as
4x − 3y = 1, and the segment as exactly 5. Ask it how far that line passes from a point that is not on it — the origin, say — and it has nothing to say. Derive that distance from the two points alone.-
Everything below comes out of one subtraction. B − A is the trip from A to B: three across, four up, which is exactly what the two leg rows report.
-
Those legs are the sides of a right triangle whose hypotenuse is the segment, so its length is Pythagoras and nothing more. This is the pair where the root closes — 25 is a square, so the exact row prints 5 rather than a surd.
-
The equation needs no division at all. Every point on the line makes the same gradient with A, and clearing that fraction turns it into Δy·x − Δx·y, equal to whatever that combination comes to at A. It is the form on the page, and it is the form that survives a vertical segment, where y = mx + c cannot be written down.
-
Now read the coefficients you just produced. (4, −3) is (Δy, −Δx): the segment turned through a right angle. Rotating a vector does not change its length, so the normal is 5 long — the same 5 as AB. That is not an accident of this preset; it holds for every pair of points, and it is what makes the next line cheap.
-
Move one unit along the normal and the left-hand side changes by 5, which is the normal's own length, so the value it takes at any point is the distance to the line multiplied by 5. Feed the origin in: the numerator collapses to 1, the denominator is that same 5, and the line misses the origin by exactly one fifth.
-
Walk that fifth and you should land on the line itself. The foot of the perpendicular sits at (0.16, −0.12), and putting it back into 4x − 3y returns 0.64 + 0.36 = 1 — on the line, and 0.2 from where you started.
-
One consequence comes free. If the denominator of the distance formula is |AB|, then |AB| times that distance is twice the area of the triangle with O, A and B at its corners.
Answer
The line passes 0.2 from the origin, and the triangle OAB has area exactly ½. Check the area by a route that never mentions distance: the shoelace formula gives ½|xAyB − xByA| = ½|5 − 4| = ½. Two derivations sharing nothing after the first subtraction, landing on the same number. The tool follows you as far as the third line and then goes quiet — the distance from a point, the foot of the perpendicular and the area are all things it does not compute.
-
-
What the two leg readouts know about the grid 6 steps
The panel gives Δx = 10.0 and Δy = −10.0. Work out how many grid points this segment passes through on its way, and decide whether the two legs alone were enough to tell you.
-
Length first, because it gets divided later. √(10² + 10²) = √200 = 10√2, which the panel prints twice over: 14.14 rounded and 10√2 exact.
-
Write the segment as a walk. X(t) = A + t(Δx, Δy) = (−5 + 10t, 6 − 10t), with t running from 0 to 1.
-
X(t) has whole-number coordinates when tΔx and tΔy are both whole, and that happens exactly when t is a multiple of 1/g, where g is the highest common factor of |Δx| and |Δy|. Here g = gcd(10, 10) = 10, so t runs through tenths.
-
Each tenth advances by (Δx/g, Δy/g) = (1, −1), giving nine points strictly between the ends: (−4, 5), (−3, 4), and so on down to (4, −3). They are evenly spaced, √2 apart, because the length divides by g as well.
-
The same split says when the length comes out whole. |AB| = g√((Δx/g)² + (Δy/g)²), so the surd lives entirely in the reduced pair. Here that pair is (1, 1) and nothing can clear the √2. On the 3-4-5 preset g = 1 and the reduced pair is (3, 4), one leg pair of a Pythagorean triple, which is why that distance prints as exactly 5.
-
The midpoint needs no separate work. It is the point at t = ½, so it lands on the grid exactly when ½ is a multiple of 1/g, that is when g is even. Here g = 10 and the midpoint (0, 1) is the fifth of the nine. On the 3-4-5 preset g = 1, and (2.5, 3) sits between grid lines.
Answer
Nine, and yes. The highest common factor of the two legs decides all of it, and both legs are on the panel: a segment between grid points crosses g − 1 others, its length is rational only when the reduced pair is a Pythagorean one, and its midpoint is a grid point only when g is even. That last test has a consequence worth carrying away. A grid point falls into one of four classes by the parity of its two coordinates, so among any five of them two must share a class, and the midpoint of those two lands on the grid.
-
Learning path
The triangle rules, and where they come from
References (2)
- the origin of describing a curve by the coordinates of its points Descartes, R. (1637). La Géométrie, appendix to Discours de la méthode. Leiden: Jan Maire.
- the theorem the distance formula is an application of Euclid. Elements, Book I, Proposition 47.