Episode: 3126 Title: HPR3126: Metrics part II Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3126/hpr3126.mp3 Transcribed: 2025-10-24 17:20:46 --- This is Hacker Public Radio Episode 3126 for Monday the 27th of July 2020. Today's show is entitled Metrics Part 2. It is hosted by Andrew Conway, and is about 33 minutes long and carries a clean flag. The summer is the metric of a 2D curved surface. This episode of HPR is brought to you by Ananasthost.com. Get 15% discount on all shared hosting with the offer code HPR15. That's HPR15. Better web hosting that's Honest and Fair at Ananasthost.com. Hello, this is McNalloo and this is the second part in my series. It might just be two parts, who knows, on metrics. There is a first part and it was show 3101. I was slightly excited for a moment when I thought 3101 was a prime number, but it turns out you can divide it by 7. One day I'll get a show that's a prime number. I might have been on one already, I've not checked all of them. Anyway, I digress almost immediately. What my show was about was it was describing the concept in mathematics of a metric. I think it's a concept that goes beyond mathematics like many things mathematics does or do. Now, I described it in very short time terms as the metric is like a mathematical ruler. What that means is that you dispecify a position in coordinates and you specify another position in some a set of coordinates too. The metric will take those coordinates and tell you the distance between those two points. That is essentially what it does. Well, it's a bit more to it than that in that you also have to define metrics over very, very tiny distances. So small that they're very small, but they're not actually zero. So it's opposite idea of an infinity number. So big that it's bigger than any number you care to imagine, but isn't actually a number. So metrics really describe infinitesimal distances, which is a very strange concept, but you'll see why that matters. Because in some cases, like the one I'm going to talk about today in a minute, it really does matter where you are distance. I think of distance as, you know, distance between two points. Well, that's true, but your coordinates will change and give you different distances depending on where you are. And that is a point I'll come to in a minute. So that's why it's important to talk about things what's called locally. You can only talk about infinitesimal, very small changes in distance. You can measure any distance you want, but you have to build that up by looking at adding up lots of small distances, or small changes in coordinates. And the last time I looked really at a flat surface, and I said, you had Cartesian coordinates that were x and y, and they were the simplest. Their metric is Pythagoras. That has a strange property that it is global. It is true everywhere Pythagoras can, the Pythagoras theorem can be used to construct a metric where the distance between any two points is the difference, well, the difference between any two points squared is equal to the sum of their x coordinate difference squared plus the y coordinate difference squared. So it's Pythagoras, three sides of a rectangle triangle. Now, that isn't almost the most convenient coordinates you use. You could use polar coordinates, which is essentially like a distance and a bearing. Or a direction measured as an angle. And if you do that, then you still talk about a flat surface, but then you get a coordinate that the angle that depends on your radius, how far away you are from the origin of your coordinate system. So that very simple example illustrated where you might not want to use x and y coordinates. You might choose polar coordinates, but then your metric becomes complicated, and a change in angle will, as I say, depend on your other coordinate, your radius. And that complicates things. Now, that's a choice that you might choose to make in a flat 2D surface. But in other, in fact, just what every other case you can imagine, every other kind of 2D surface that's not flat, you just can't use a pair of x and y coordinates. It's impossible. You could use it locally, but you can't extend that globally, because if you've got a curved surface, you can't use x and y, because it depends where in the surface you are and how it curves at that particular point in the surface. That's the short explanation. But let me press on and talk about a particular curved surface. I'm not going to tell you what it is yet. You might think you're going to guess what it is, but you'll have to think through this little puzzle that I'm setting you. Well, it almost sounds like a paradox, but it isn't, because I will immediately explain why it might be surprising. So I would have asked you to imagine that you are standing on some curved surface. And you don't know what it is. But you know that it may look flat locally, like standing on the earth, but in fact, it isn't flat, it's curved. And then you decide you pick a direction, and you can pick any direction that will work, whatever direction you decide to move in. And you move, let's say, x kilometers. Now, it doesn't matter exactly what x is right now, just that it is x. Then after you've walked x kilometers in a direction of your choice, you can choose any direction you like, you turn right by, you make a 90 degree right turn. And then you walk any distance you like. It can be one step. You can get in a plane and fly for 10 hours. It doesn't matter, you can just travel any distance you like. And then at some point you stop, you turn right, and then you travel x kilometers again. And you are absolutely guaranteed, and the surface time describing, to be back where you started. So you've picked a direction, any direction, you've gone x kilometers, you then turn right, then you travel any distance you like. And then you turn right again, and walk to x kilometers or moved x kilometers again, and you're back where you started. What kind of curved surface is that? Well, actually, there's more than one type of curved surface it could be. The one that I actually mentioned already, and I said I was going to talk about it, so you might have guessed it. I'm not talking about some hyper-dimensional sphere that you might find in a book by Stephen Hawking. No, I'm talking about the surface of the earth, the surface of a sphere. Okay, the earth isn't quite exactly spherical, but let's imagine it is. So we're talking about the surface of a sphere like the earth. Now, what I just described, as I described it, actually will only work if the distance x is a quarter of the circumference of the earth. So, the easiest way to imagine it is if you start at the pole of the earth, and you walk, pick any direction you like, because at the pole any direction you like is going to be south. As to be south, there's at the north pole, there is no other way you can move in at the south pole, you can only go north. And you move until you get to the equator, so that's a quarter of their circumference. And then you turn right, so you then walk around the equator, and you go around the equator as much as you like, doesn't matter. And then you make another right turn, and then you'll be heading north, back north, but not necessarily the same way you came, but you will, you're guaranteed, if you head north, you're guaranteed to arrive back at the pole. So that's how that works. Now, actually, there are ways to do something similar without being on the surface of the sphere, and I'm not interested in talking about that. Incidentally, a quarter of the circumference of the earth is very close to 10,000 kilometers. Just thought I'd mention that. Now, the important thing about this, is if you think about it, and making this three-legged journey with a 90-degree turn at each point in the journey, you have drawn what looks like a triangle on the surface of the earth. And this triangle is called a spherical triangle. Now, there's a few things that we're seeing about this. Now, the first thing is the sides of this triangle are not straight lines. There are no such things as a straight line in the surface of the earth. You can't draw a straight line on the surface of the earth. It's impossible. So the sides of this triangle are not straight lines, but they are arcs. I'll say a little bit more about that in a minute. Now, the other thing that's interesting about this triangle, is it's got three angles at each corner, and each one of them is 90 degrees. Well, sorry. Actually, the one at the top needn't be 90 degrees, but let's say that each side of the triangle you've walked and let's change the example a little bit, specify a bit more precisely that you walk a quarter of an earth circumference on each side. So it's an equilateral triangle on the surface of the sphere. And what you will find is that the triangle, what's called a spherical triangle, if you add up the angles, you get 270 degrees in this example. And if you know about normal triangles in a 2D flat surface, you would know that the angle of the triangle always adds up to 180 degrees. So this version of a triangle called the spherical triangle is different. It can have angles add up to more than 180 degrees. The smaller the triangle gets, by the way, the closer the triangles, angles, will be to adding up to 180 degrees and the closer the sides of the triangle look to being straight lines. That's just saying if you are working locally in the surface of the sphere in a small enough scale, much less in the radius of the earth, then everything starts to look flat again. So that's all that is. Now, the reason I'm sort of laboring this thing about spherical triangle is so I can now make an important analogy. I'll draw your attention to a similarity that's going on here. The sides of a triangle are straight lines. Straight lines are special and two-dimensional flat surfaces because they are the fastest way to get between any two points. So if you join any two points with the straight line, that is the fastest route between them. That is the shortest distance you need to travel to go from one point to the other. The same is true of the things that make up the sides of this spherical triangle. They are called arcs of great circles. And the great circle is to the sphere what the straight line is to a flat 2D surface. And a great circle, I should say, is any circle drawn on the surface of a sphere that has the same radius as the sphere. So for the earth, the most famous example of a great circle would be the equator. And indeed, any two diametrically opposite points on a sphere, so the two poles, for example, can be used to construct a great circle that runs through both of them. And so you can imagine there's a great many great circles that you can draw all over the surface of a sphere and the earth. But we only have a name for one special one, the earth, and that's the equator. You could argue that we have the Greenwich Meridian, but that's actually only half a circle, it's only half a great circle, because the other half is from the back. And I think that's called the international date line, so we don't have a name for that whole great circle. I don't think, at least, if there is, I've not heard it. So, that little triangular walk was to introduce you to that idea. Now, the important point there is, I've introduced the idea of, there's a special thing on your surface, a special shape, one dimensional shape, that you can use to measure a special distance, the short, which is the shortest distance, in the cases we're looking at. And for the flat surface, it was a line, for the sphere, it's the great circle. And there are a few things to worth noting, that, well, first of all, there's no such thing as parallel lines on the surface of a sphere. There's no obvious analog to that. You get parallel lines on the surface, on the flat surface, but on the surface of the sphere, no lines are parallel. Well, no two great circles can be parallel, so let's move on from that to the metric. So, what is the metric for a sphere? Well, let's start with the fact that we need to construct some coordinates in order to talk about metric. So, the most obvious ones for the Earth are longitude and latitude. So, your latitude is the angular distance you are away from the equator. And as you go further north from the equator, this angle increases until you finally get to 90 degrees north at the north pole. And as you go south from the equator of that angle latitude, decreases until you get to minus 90 degrees or 90 degrees south at the south pole. And then the other angle you need to use is called the longitude. And we measure longitude from the line I've already mentioned, which is the Greenwich Meridian, which runs from the north pole to the south pole through, for historical reasons, through Greenwich and London, the French wanted it to run through Paris, but who had the bigger navy at the time? I'm quite sure that if the zero of longitude was decided in the 20th century, it would have gone through Washington, DC, and if it was decided now, it could quite possibly go through Beijing. Anyway, whoever's got the biggest navy at the time gets to decide where it goes. And it happened to be the British, so it goes through London and Greenwich. And then we got the Greenwich Meridian. Or the Prime Meridian, I think that was an attempt to de-emphasize the geographical geopolitical significance of that Meridian. Anyway, so you draw this line and then if you're heading east or west, you're changing your longitude. So I'm currently sat actually very slightly west of the Greenwich Meridian, so I'm, I think, four degrees west here in Glasgow and in Scotland. And then if you keep going west, eventually you get to North America and then through the Pacific and then you'll get to international deadline, which has a longitude of either 180 degrees east or west, don't which you would call it, actually. Sometimes longitude is also defined as positive or negative and it's positive going west, I think, but I usually like to specify west, at least to avoid having to remember which way is which. So those are our coordinates. So we need to work with those. Now, what we want to do is the metric will tell us, if we change our longitude and latitude by small amounts, what distance will we have moved? Okay, that is what the metric is going to do for us. And you'll see, it'll be a nice example, better, I think, than the 2D one, of why this has to be infinitesimal distance. It has to be very small distances. And it's, as I said before, it's because the change in distance depends where you are in the earth. We'll see why. Now, let's, first of all, keep things simple, let's fix one of the two coordinates. So let's fix longitude first. That's easier one to fix first. So we're going to be moving up and down a meridian. So let's just, even greater simplest states, imagine we're on the green edge, when I'm doing zero degrees longitude. It doesn't actually matter, but I like to have a picture in my head. And also, in the cell, you'd come and visit me, or at least visit the North of Scotland, probably closer to where my friend Kavi is, and when I am, anyway, that doesn't matter. What matters is that we're constraining ourselves to move along a line of longitude here. So we're going to vary the latitude and it's actually quite simple. If we move in latitude by one degree, and it doesn't matter where we are on the earth, if we change our latitude by one degree, we'll have moved 60 nautical miles. Okay? And what is the definition of a nautical mile? Well, it's actually 1.15 statutory normal miles, or it's about 1.8 kilometers. But actually, this is the definition. What I'm talking about is the definition of the nautical mile, because just like an hour, sometimes too long, a period for us to use, we'd like to divide it into 60 subdivisions called minutes. Astronomers, in particular, and old-fashioned nautical people do that with degrees as well, because a degree is quite big. So you subdivide a degree into 60 arc minutes, and now you can see what I'm about to say, hopefully, that one arc minute change in latitude is always equal to one nautical mile. So the nautical mile is defined with this in mind. It just so happens that a 60th of a degree on the earth comes out as 1.15 nautical miles. Maybe there's some historical reason for the choice of that. I don't know. Wait, it's just a coincidence. But it's not exactly a mile, is it? It's 1.15. It's not one for the numerologists out there. Anyway. Now, if you don't like that, if you want to work in kilometers or a normal miles, let's say kilometers, because that's the, then it's actually not that difficult. You take your change in latitude, you express it in radians. So if you work in degrees, you multiply by pi and divide by 180. But you express your change in latitude in radians, and then all you have to do is multiply by the radius of the earth, which is 6400 kilometers, and bingo you've got your distance. And if you think about it, if your change in latitude is 2 pi, that is, you've gone all the way around the earth, you know, you've done a second navigation through the poles, so a change in latitude of 2 pi, then it's 2 pi times the radius, 2 pi times the radius, is a circumference of the earth. There you go. So, now I'm probably getting a bit off track here. Anyway, my point is, that it's a very simple relationship. But let's stick with the arc minutes. So one arc minute, change one arc minute of latitude, equals one more to come mile. And that's latitude. We've done latitude. Okay, let's move on to longitude. And let's now imagine we're on the equator of the earth, and we only move east or we move west. Okay, so we're on the equator. Now the equator is a great circle, just like the Greenwich Meridian is on a great circle. So the same thing applies. If we're just moving around the equator, one arc minute change in longitude gives you one more to come mile. Okay, so, or if you prefer, you take the change in your longitude and radians, multiply by the radius of the earth. Bingo. You've got your distance. You just travel. Okay. But this is where it gets. Complicated stroke. Interesting. Let's now imagine that you've come to visit me up in Glasgow, which is okay, or maybe a bit further north than that. But let's say it's 60 degrees north in the earth. And I'll tell you why it's 60 degrees north and that'll make things a little bit simpler. Now, the first thing I'd like you to imagine is that if we're moving in longitude on the equator, we're moving around a great circle, a circumference of the earth. If we're moving around the circle of longitude that's at 60 degrees north, I think you can imagine that that's going to be a smaller circle. And indeed, if we went all the way to the, as we get closer and closer to the pole, that circle becomes smaller and smaller until at the pole, where, you know, our distance travelled is nothing because there's no, you can't define longitude in the pole. There's only, well, you've only got a latitude of 90 degrees and there's no longitude you can talk about. So you need to step away from the pole. You've got a longitude. But on the pole, that's undefined. Anyway, so it's 60 degrees north. It turns out that if you, into a little bit of trigonometry, you can work out that the radius of that circle at 60 degrees north is exactly half that of their circumference. And that's because the size of the circle, the radius of this circle, scales as the cosine of the latitude, if you're into your trigonometry. And the cosine of 60 degrees is exactly a half, which is why I picked 60 degrees. Now, I think you can now see what I'm talking about. Because, away from the equator, at a constant latitude, the circles get smaller and smaller as you get to the poles, and same is true in the southern hemisphere of the earth. And I'm obviously northern hemisphere centric. I admit that, I apologize. I do occasionally mention the southern hemisphere, but I've been there, but most of my life has been in the northern hemisphere. So yeah, another show there about northern hemisphereism or whatever you want to call it. Anyway, the point being that a change in longitude, away from the equator, involves smaller and smaller distances as you get closer and closer to the pole. And you need to multiply by the cosine of your latitude. So we can fix this problem. We can now say that away from the equator, the distance traveled when you move, or you change longitude by a certain amount, is equal to the change in that longitude multiplied by the cosine of the latitude that you're at. And whatever that gives you, is the distance that you've moved in nautical miles. And again, you can do the exact same thing. You can express the change in longitude as radians and then multiply by the radius of the earth, then multiply by the cosine of the latitude. That works too. Okay, so I think you've hopefully got, even if the trigonometry isn't your taste, you've got the idea that the change in longitude depends on where you are in the earth. It depends on your latitude. It doesn't depend on your longitude, it just depends on your latitude. So we can put all this together and the metric for the surface of a sphere is as follows. So the change in, well, the distance, the small distance traveled squared equals the change in your latitude squared plus the change in your longitude squared times the cosine of your latitude squared. Okay? In other words, what we've really done is applied Pythagoras locally using everything that I've just talked through there. I'll try and put some diagrams in the show notes. If I have time, I can't put on a set, but I will try. So, because I do appreciate it, it's quite difficult to picture these things. I'm trying my best, but I'm not very good at drawing pictures. But hopefully, this is about, yeah, we were in HPR, so hopefully an audio, verbal description is getting us somewhere. Right, now, just to reiterate, for that to work, you need to express all your changes in longitude and latitude in arc minutes, and the distance that comes up at the end of that will be in nautical miles. And again, you could use the radius of the earth and radians as we described as well. So, that will let you measure the distance. So, if you talk about a small change in longitude and latitude, that will allow you to measure the distance. And that then, if you imagine a complicated wiggly path, maybe you're sailing, but you're sailing your own earth, in a wiggly wiggly fashion with the wind because your wind's blowing your own. Every day, you can add up your little changes in longitude, calculate all the distances using that metric. And you know, it would work fine. You get there. You get the correct distance that you'd travelled, that your fancy GPS device would tell you. But now you can do it using pen and paper, assuming you could actually work out what longitude and latitude you were at, any given time, which might actually require a GPS device, unless you're very skilled with your astronomical observations, and had a good clock. So, I want to end this little, two of the flat surface of a sphere with, by introducing you to the concept of geodesics. Now, actually, I've already done it. The geodesic on a flat 2D surface is the straight line. The geodesic on the surface of a sphere is, yep, I think you probably guessed it, it's a great circle. Now, what do I mean? But what do I mean? Well, actually, I don't know what the geomeans earth. Yeah, in the comments, please tell me what the desic, but it means I can't think of top of my head, what that means from the Greek. But the concept of it is it's telling you what the special path is on the geometry of the surface that you're working on. Straight line for a flat, for a sphere, it's a great circle. And the special thing about the geodesic is it tells you what the extremal path is. An extremal in this case means extremism, the shortest path. So as you specify two points on a sphere, the shortest distance between them is measured along a great circle. If you specify two points on a flat 2D surface, the shortest distance between them is along a straight line. Now, this actually starts to leak into a real world in that if you are travelling in an ideal fashion on the surface of a sphere, for example, let's say we're travelling on a flat surface with no friction or any other force acting, then if you start moving and no other forces are acting and there's no friction or anything, you'll just keep going and going in that straight line. That's what's special. That's why it's called a geodesic. If nothing else is going on, that's where you're going. That's what's going to happen. That's where you're moving. On the surface of a sphere, if you pick a direction and start moving in it, and then no other forces act on you, you'll move at a constant speed, along a geodesic, along a great circle. And of course, this has a real life application. If you are running a nail line company, and you want to say fuel, you do not want to fly or along constant lines of latitude. No, no, no. You will want to fly along great circles. You know, locally, you know, from short distances inside countries, probably not. But certainly when you're going to thousands of kilometers and above, you definitely want to be flying along great circles. Unless it takes you somewhere dangerous, like I don't know, South Pole, North Pole, if there's a storm or something. Well, you can fly over the North and South Pole. I'm not talking about you can do it. But I do remember during the Iraq war, us taking a very large dog leg around the rack for obvious reasons when I was flying. So the geodesics have the special property. But the importance is actually even deeper than that. They're linked closely to the geometry of the space time that you're in. And in fact, in Einstein's theory of relativity, what that says is the presence of energy and mass is what dictates how space time is curved. And then you can work at what the geodesics are, where if there's no other forces acting, how a test particle would move through space and time. Or I should say space time, not space and time, space time. So energy and mass tells space time how to curve. And space time, its curvature, then tells mass how to move. It literally dictates what the geodesics are. And here's the interesting. But this does away with the need for gravity. You don't need gravity in Einstein's theory of relativity. It's embodied in the nature of the curvature of space and time itself. And the path of any free object, freely moving object, is one of these geodesics. So I think I'll leave it there. I've teased you a little bit about what this has to do with relativity. I think I got nice comments in the first show. So thank you to the various people who said they liked it. If I see similar comments for this show, I probably will do another episode. I kind of feel in the mood to be honest. So I probably will, even if you, unless you see you hate it, actually. If you say you hate it, I'll probably just go in cries and wear. But otherwise, I probably will do another episode. And if I do another episode, it's going to be on a three-dimensional curve space. I've talked about two-dimensional curve space and I have this lovely example called the surface of the earth. For you to wonder about on. And three-dimensional curve space our intuition fails us. And I have no example to talk about. And lots of really wacky interesting things happen. And it won't matter that this is HDR and it's all due only. And you can't give you any diagrams. It will just be lovely. It'll be great. I look forward to that. Doing it myself. And hopefully you, you people will enjoy listening. So I have to fight it here. Anyway, until next time. Thank you very much for listening and remember. Please do leave comments. I like comments. And this is HDR. So please do record a show if you've got something to add or correct about what I've just said. Thank you very much. Bye-bye. Thank you very much. Bye-bye.