Geometry Through any point not on a line: one parallel, at least two, or none. math · geometry Study sequence: [Vectors](vectors.html) · [Matrices](matrices.html) · [Matrix applications](matrix-applications.html) · [Calculus](calculus.html) · [Big O](big-o.html) · Geometry · [Signals](signals.html) · [Neural nets](neural-nets.html) · [Distributions](distributions.html) # Euclidean Geometry ## Parallel Axiom Through any point $p$ not on the line $L$ there exists precisely one line $P$ that is parallel to $L$, and the angle sum of a triangle is $\pi$. $\pi$ radians is a half turn, 180 degrees. A radian is the angle that marks off an arc as long as the radius. On a flat plane the three angles inside a triangle add to that half turn. The picture computes the slope of the base, the rise over the run: $$m=\frac{y_2-y_1}{x_2-x_1}$$ A parallel line through $p$ uses that same slope, so it stays a constant distance from $L$. calculate the slope of the triangle's base line segment ```python triangle_vertices = np.array([ [0,2], [1,0], [-2,-1] ]) triangle = Polygon( triangle_vertices, facecolor="lightgrey", edgecolor="black" ) # calculate the slope of the triangle's base line segment # eq: m = (y2 - y1)/(x2 - x1) x1,y1 = ( 1, 0) x2,y2 = (-2,-1) x3,y3 = ( 0, 2) m = (y2 - y1) / (x2 - x1) print(f"m({m})\np1{x1,y1}\np2{x2,y2}") # extend the line to a point left # t distance units from p(x1,y1) d = 4 x4 = x1 - d y4 = y1 - (m*d) print(f"p3{x4,y4}") # extend the line to a point right # t distance units from p(x2,y2) d = 4 x5 = x2 + d y5 = y2 + (m*d) print(f"p4{x5,y5}") # calculate the parallel line # from the third vertex and the # slope of the base d = 3.5 x6 = x3 - d y6 = y3 - (m*d) d = 1.5 x7 = x3 + d y7 = y3 + (m*d) print(f"p5{x6,y6}") print(f"p6{x7,y7}") # angles = [ Wedge((x2,y2), 0.5, 19, 55, width=0.1, color="black"), Wedge((x3,y3), 0.5, -158, -123, width=0.1, color="black"), Wedge((x3,y3), 0.5, -123, -65, width=0.01, color="black"), Wedge((x3,y3), 0.4, -123, -65, width=0.01, color="black"), Wedge((x3,y3), 0.5, -65, 15, width=0.01, color="black"), Wedge((x3,y3), 0.4, -65, 15, width=0.01, color="black"), Wedge((x3,y3), 0.3, -65, 15, width=0.01, color="black"), Wedge((x1,y1), 0.5, 120, 195, width=0.01, color="black"), Wedge((x1,y1), 0.4, 120, 195, width=0.01, color="black"), Wedge((x1,y1), 0.3, 120, 195, width=0.01, color="black") ] fig, ax = plt.subplots(figsize=[6,6]) ax.axis([-4.5, 3, -4, 4]) ax.add_patch(triangle) for angle in angles: ax.add_patch(angle) ax.plot(x1, y1, "o", color="steelblue") ax.plot(x2, y2, "o", color="steelblue") ax.plot(x3, y3, "o", color="steelblue") ax.plot((x4,x5), (y4,y5), color="black") ax.plot((x6,x7), (y6,y7), color="black") ax.annotate("L", (x5+.1,y5+.05)) ax.annotate("P", (x7+.1,y7+.05)) ax.annotate("p", (x3,y3+.2)) plt.grid() plt.show() ```  # Non-Euclidean Geometries ## Hyperbolic Geometry ### Hyperbolic Axiom There are at least two parallel lines through $p$ that do not meet $L$. On this surface a triangle's angles add to less than $\pi$. ## Spherical Geometry ### Spherical Axiom There are no lines through $p$ that are parallel to $L$: every line meets $L$. A line on a sphere is a great circle, a circle whose center is the center of the sphere. Any two great circles meet. A triangle's angles add to more than $\pi$. # Three sizes of infinite space An infinite set can be a small one. The [unit vectors](vectors.html#unit-vectors) are infinite, and every one of them has length 1. Length is the straight-line distance from the origin to the tip. The set is bounded and closed. Bounded means there is a farthest reach. Closed means that farthest reach belongs to the set. The points sit on a circle. The non-unit vectors are infinite too, and the length can be any positive number, so the set is unbounded: past any reach there is a farther vector. These three geometries are that same comparison, in three sizes. The size is the amount of room. Room is the area inside a circle of walked radius $r$, the distance you walk along the surface from the center of the circle. Area is the amount of surface inside that walk. **Spherical space** is the small infinity, the unit-vector case. The whole surface is bounded and closed. Curvature is a number that says how the surface bends. Positive curvature bends together, the way a ball does. On the sphere of curvature $+1$, the walked radius runs from $0$ out to $\pi$, and there you are at the opposite point. The area inside the circle is $$2\pi(1-\cos r)$$ and the length of the rim is $2\pi\sin r$. Both grow and then come back down. At $r=\pi$ the circle has covered the whole sphere, and the area of that sphere is $4\pi$. Infinitely many points, and a finite amount of room. **Euclidean space** is the middle infinity. Curvature $0$ is flat. There is no farthest point. The area inside a circle of radius $r$ is $$\pi r^2$$ and the rim is $2\pi r$. Letting $r$ grow with no cap makes the area infinite, and the growth is the square of the distance. The set of lines through $p$ that miss $L$ has one member. **Hyperbolic space** is the large infinity. Curvature $-1$ flares, the way a saddle does, so a circle spreads faster than the same circle on the flat plane. The area inside a circle of radius $r$ is $$2\pi(\cosh r-1)$$ and the rim is $2\pi\sinh r$. The hyperbolic cosine and the hyperbolic sine are the flared versions of cosine and sine: $$\cosh r=\frac{e^{r}+e^{-r}}{2}$$ $$\sinh r=\frac{e^{r}-e^{-r}}{2}$$ $e$ is about 2.718. For a large radius the area is close to $\pi e^{r}$. Each step outward multiplies the new room. The flat circle grows by squaring the radius. The lines through $p$ that miss $L$ are an infinite set, one line for each direction between the two edge directions that graze $L$ and do not meet it. The angle sums above are this same room. On the unit sphere a triangle's angles add to more than $\pi$, and the surplus, the amount past $\pi$, equals that triangle's area. On the flat plane the angles add to $\pi$. On the hyperbolic plane the angles add to less than $\pi$, and the missing amount equals that triangle's area. More room in the space leaves less angle inside the triangle. Next: [Signals](signals.html).