Course Test · University: upper level
College geometry: RatMath answers
The same twenty exercises, answered with RatMath Core and the Shelf libraries only. The code below was run when this page was built; its output is shown as printed, and compared with the independent answer.
Agrees 20
Libraries used here: core, geo. In this code each library is in scope under its own name (linalg.det, stats.tTest), and Core's names (R, Rational, …) are in scope directly.
- 1.Triangle centresAgreesFor the triangle , , , find the circumcentre and circumradius, the incentre and inradius, the orthocentre and the centroid.Independent answerRight angle at : the circumcentre is the midpoint of the hypotenuse, , radius . Inradius , incentre . The orthocentre is the right-angle vertex . Centroid .RatMath code
const T = geo.triangle([0, 0], [4, 0], [0, 3]); [T.circumcenter, T.circumradius, T.incenter, T.inradius, T.orthocenter, T.centroid].map(String)Output["(2, 3/2)", "5/2", "(1, 1)", "1", "(0, 0)", "(4/3, 1)"]
- 2.The Euler lineAgreesFor the same triangle, show the circumcentre , centroid and orthocentre are collinear with , and find the line.Independent answer, , all lie on . , .RatMath code
const T = geo.triangle([0, 0], [4, 0], [0, 3]); [geo.collinear(T.circumcenter, T.centroid, T.orthocenter), geo.distance(T.orthocenter, T.centroid), geo.distance(T.centroid, T.circumcenter), String(T.eulerLine)]Output[true, 5/3, 5/6, "3·x - 4·y = 0"]
- 3.Nine-point circleAgreesFind the centre and radius of the nine-point circle of the same triangle.Independent answerIts centre is the midpoint of , , and its radius is half the circumradius, .RatMath code
String(geo.triangle([0, 0], [4, 0], [0, 3]).ninePointCircle)Outputcircle, centre (1, 3/4), radius 5/4
- 4.InversionAgreesFind the images of and under inversion in the unit circle.Independent answer: and .RatMath code
const inv = geo.inversion(geo.circle([0, 0], [1, 0])); [inv.apply(geo.point(2, 0)), inv.apply(geo.point(1, 1))].map(String)Output["(1/2, 0)", "(1/2, 1/2)"]
- 5.Cross ratioAgreesFind the cross ratio of the points 0, 1, 2, 3 on a line.Independent answer.RatMath code
const p = (x) => geo.point(x, 0); geo.crossRatio(p(0), p(1), p(2), p(3))Output4/3
- 6.Harmonic conjugatesAgreesOn a line, , , . Find the harmonic conjugate of with respect to .Independent answer: , so , .RatMath code
String(geo.harmonicConjugate(geo.point(0, 0), geo.point(3, 0), geo.point(1, 0)))Output[-3 : 0 : 1]
The answer is in homogeneous coordinates . - 7.Conic through five pointsAgreesFind the conic through , and , and classify it.Independent answerSymmetry suggests ; : . An ellipse.RatMath code
const c = geo.conicThrough([geo.point(1, 0), geo.point(-1, 0), geo.point(0, 2), geo.point(0, -2), geo.point("3/5", "8/5")]); [String(c), c.classify()]Output["−x² − 1/4y² + 1 = 0", "ellipse"]
- 8.Composing reflectionsAgreesReflect in the line , then in the -axis. What single isometry is this?Independent answer: rotation about the origin by , twice the angle between the mirrors.RatMath code
const r = (p, q) => geo.reflection(geo.line(geo.point(...p), geo.point(...q))); const T = r([0, 0], [1, 0]).compose(r([0, 0], [1, 1])); // x-axis after y = x const c = T.classify(); [c.kind, String(c.center), String(c.degrees)]Output["rotation", "(0, 0)", "-90"]
- 9.Pick's theoremAgreesThe rectangle with vertices , , , has how many interior lattice points? Check Pick's theorem.Independent answerBoundary points , interior . , the area.RatMath code
const p = geo.pick([[0, 0], [4, 0], [4, 3], [0, 3]]); [p.interior, p.boundary, p.area, p.holds]Output[6, 14, 12, true]
- 10.Regular polygonsAgreesFind the interior angle of a regular 12-gon, as a fraction of a full turn and in degrees.Independent answerof a turn.RatMath code
const a = geo.polygonAngle(12); [a, a.multiply(R`360`)]Output[5/12, 150]
- 11.Spherical trianglesAgreesOn the unit sphere, take the north pole and the equator points at longitudes 0° and 90°. Find the angle sum, excess and area of the triangle.Independent answerThree right angles: sum , excess , area = excess , one eighth of the sphere's .RatMath code
const T = geo.striangle(geo.northPole(), geo.latLon(0, 0), geo.latLon(0, "1/4")); [T.angleSum, T.excess, T.area, T.fractionOfSphere].map(String)Output["3π/2", "π/2", "π/2", "1/8"]
latLontakes fractions of a full turn, not degrees:latLon(0, 90)is 90 whole turns, the same point aslatLon(0, 0). - 12.Great-circle distanceAgreesOn the unit sphere, how far apart are the points at latitude 0°, longitudes 0° and 90°?Independent answerThe central angle is : distance .RatMath code
String(geo.latLon(0, 0).distanceTo(geo.latLon(0, "1/4")))Outputπ/2
- 13.Hyperbolic distanceAgreesIn the Poincaré disc, find the distance from the centre to the point .Independent answer.RatMath code
String(geo.horigin().distanceTo(geo.hpoint("1/2", 0)))Outputln(3)
- 14.Hyperbolic trianglesAgreesIn the Poincaré disc, find the angle sum and area of the triangle with vertices , , .Independent answerSides (from 0) and . The angle at 0 is ; by the hyperbolic law of cosines the other two are each. Sum , area = defect .RatMath code
const T = geo.htriangle(geo.horigin(), geo.hpoint("1/2", 0), geo.hpoint(0, "1/2")); [T.angleSum, T.defect]Output[2.6516353273…, 0.4899573262…]
- 15.Ideal trianglesAgreesWhat is the area of a hyperbolic triangle whose three vertices are on the boundary circle?Independent answerAll three angles are 0, so the area is the defect .RatMath code
const T = geo.htriangle(geo.ideal(1, 0), geo.ideal(-1, 0), geo.ideal(0, 1)); [T.angleSum, T.area].map(String)Output["0", "π"]
- 16.Finite projective planesAgreesThe Fano plane is the projective plane of order 2. How many lines does it have? How many points has the projective plane of order 3?Independent answerOrder gives points and lines: 7 for , 13 for .RatMath code
const F = geo.fano(); [F.order, F.lines.length, F.isProjectivePlane(), geo.projectivePlane(3).lines.length]Output[2, 7, true, 13]
- 17.Euler's formula for polyhedraAgreesCheck Euler's formula for the icosahedron.Independent answer20 triangular faces, , five faces at each vertex so . .RatMath code
const P = geo.solids.icosahedron(); [P.V, P.E, P.F, P.euler]Output[12, 30, 20, 2]
- 18.Taxicab geometryAgreesFind the taxicab and Euclidean distances between and .Independent answerTaxicab: . Euclidean: .RatMath code
[geo.metric("taxicab").distance([1, 2], [4, 6]), geo.distance(geo.point(1, 2), geo.point(4, 6))]Output[7, 5]
- 19.Euclidean theorem provingAgreesProve that the nine-point circle passes through the midpoints of the sides, the feet of the altitudes, and the midpoints from the orthocentre to the vertices, for every triangle.Independent answerClassical proof: the midpoints and the midpoints of form two rectangles with a common diagonal set, all inscribed in the circle on , the midpoint of ; the feet see these diameters at right angles.RatMath code
const p = geo.proofs.ninePointCircle; const r = typeof p === "function" ? p() : p; [r.proved ?? r.holds ?? r.ok, String(r).slice(0, 40)]Output[true, "Nine-point circle: proved (wu)"]
- 20.Sides and anglesAgreesFor the triangle , , , find the side lengths and the angle at in degrees.Independent answer, , . , .RatMath code
const T = geo.triangle([0, 0], [4, 0], [0, 3]); [Object.values(T.sides).map(String), String(T.cosines.B), T.degrees.B]Output[["5", "3", "4"], "4/5", 36.86989764584401]