Skip to main content
Loading Explore guides…
P-adic Numbers · Acedra
Home
Explore
Mathematics
P-adic Numbers
Sign in to save
Chat
If YouTube asks you to sign in, open the video on YouTube.
Watch on YouTube
Reload player
Transcript
117 segments
Copy
Hide video
0:00
You're familiar with the powers of 2, but you may not know about a hidden pattern lurking in their digits. To see it, let's give each of the digits 0 through 9 its own color. Let's also align the digits to the right. This way, all the digits in the ones place are in the same column, all the digits in the tens place are in the same column, and so on.
0:21
Now let's add a few more rows.
0:26
Overall the structure inside this triangle looks pretty random. But what if we just look at certain rows? Here is the 1st row, 10th row, and 100th row.
0:36
Here's the thousandth row. This number is too big to fit on the screen, so I've chopped if off after about 30 digits. Here's the ten thousandth row. And here's where things get weird, because watch what happens when we add more rows.
0:52
Let's include some more data.
1:02
What this is suggesting is that the last few digits of 2^(10^(n+1)) are exactly the same as the last few digits of 2^(10^n). And as we increase n, the agreement gets better and better. In other words, in some weird sense, these numbers -- these large powers of 2 -- are converging to something.
1:29
Of course, they're not converging in the usual way. 2^(10^n) doesn't converge to anything as n gets large. It diverges to infinity.
1:38
So what on earth does this sequence of digits represent? Did we just discover the secret digits of infinity? No, we discovered a number that belongs to a different number system than the one we're used to. What we'll see in this video is that if we change our ideas about which numbers are small and which are large, then we get a new number system, where this infinite-looking number actually makes sense.
2:00
This new number system provides an alternative to the real numbers, and there are good reasons to use them, instead of real numbers, in certain situations.
2:10
Before we go on though, let's take a minute and remember why we like the real numbers so much in the first place. For one thing, we can easily picture real numbers as points on the number line.
2:23
The real numbers contain all the integers as well as all the rational numbers.
2:29
The real numbers support addition, subtraction, and multiplication. They even support division. They also contain all their limit points, which is a way of saying that there are no holes in the number line.
2:42
The real numbers don't have everything we might want from a number system -- for example, they don't contain square roots of -1 -- but they're pretty good. On the other hand, the real numbers aren't the only game in town. There are alternatives that have many of the same useful properties, and even have some properties that the real numbers don't. Some of them even contain square roots of -1!
3:03
These are the systems of p-adic numbers. p will end up being a prime number, so there are the 2-adics, the 3-adics, and so on.
3:12
Are these good names for number systems? Well, no. But if we're honest, neither is "the real numbers".
3:19
To understand p-adic numbers, let's start with powers of 10 rather than powers of 2.
3:24
Eventually every digit becomes 0. So in some weird sense, 10^n is getting closer and closer to the number with all of its digits equal to 0, which is 0 itself.
3:37
Since powers of 10 are close to 0, that means they're actually small numbers!
3:43
We can make this precise by defining a new absolute value. Determine the highest power of 10 that divides a number. Then divide 1 by that power of 10. This is its 10-adic absolute value. For example, 78000 is divisible by 1000 but not 10000, so its 10-adic absolute value is the real number 1/1000. What is the 10-adic absolute value of 1 billion? 1 billion is divisible by 10^9 but not 10^10, so its 10-adic absolute value is 1/10^9.
4:21
The usual absolute value, which corresponds to distances on the number line, gives us one way to define the size of a number. The 10-adic absolute value gives us a different way.
4:31
In each setting, numbers whose sizes are close to 0 as real numbers are, by definition, small in that setting.
4:40
So, according to the 10-adic absolute value, 1 billion is a tiny number. And as you take larger powers of 10, you get even closer to 0.
4:49
But wait a second. If we're talking about a billion things, for example a billion ants, that is not a tiny amount of ants, right? That is a lot of ants! This is only a thousand, and it's already a lot. But the thing is that we're changing our fundamental definition of size. Our usual ideas of "large" and "small" are tied to the real numbers, so if we choose a different notion of size, then "large" and "small" have completely different meanings.
5:14
The real absolute value nicely corresponds to distances on the number line, where two numbers are close when their first several digits are the same.
5:23
But the 10-adic absolute value has nothing to do with the number line. Under the 10-adic absolute value, two numbers are close when their last several digits are the same. And by this metric, 1 billion and 0 are actually pretty close, because they agree to 9 digits. This is a good thing, too, because it means that there's hope of actually making sense of infinite sums like the limit of 2^(10^n) that we discovered.
5:47
It's not infinity; it's a 10-adic integer.
5:53
A 10-adic integer is a sum that looks like this, where each digit d_0, d_1, d_2, and so on, is a number in the range 0 through 9. For example, the limit of 2^(10^n) is the 10-adic integer whose digits are 6, 7, 3, 9, and so on. Every positive integer is a 10-adic integer, because we can extend its base-10 representation with 0s. Just like we can make sense of this infinite sum in the real numbers,
6:24
where powers of 10 get big,
6:26
we can make sense of this infinite sum in the 10-adic integers, where powers of 10 get small. If we want, we can make the digits easier to see by putting the powers of 10 in the denominator. We have to introduce negative exponents to do this, which looks a little strange, but now it's closer to the representation of a real number.
6:46
So we know what a 10-adic integer is -- it's essentially an integer but where you allow the digits to keep going infinitely far to the left.
6:55
Now we can revisit our table of properties and ask which properties hold for the 10-adic integers. But here's the bad news: There is no 10-adic number line. You might try to build one, say by placing 1000 close to 0, and then 1 million even closer to 0, and 1 billion even closer than that. But the problem is that different 10-adic integers can have the same size. For example, 78000 has size 1/1000. But so does 35000.
7:25
Which is bigger, 78000 or 35000? Well, neither. So we can't place one to the left or right of the other, and there is no 10-adic number line.
7:35
Since there is no 10-adic number line, there are no notions of positive and negative. This lack of a simple geometry makes the 10-adic integers counterintuitive. So we'll need to rebuild our intuition before we can maneuver comfortably in this bizarre place. But this is one of the most exciting things about mathematics. With enough exploration, we can learn to find our way around new worlds. Okay, so what about arithmetic? Can we add, subtract, multiply, and divide 10-adic integers?
8:05
Yes, in fact addition and subtraction work the same way as they do for ordinary integers.
8:11
The only difference is that the process goes on forever to the left. But that's fine. After all, when you add two real numbers, the process goes on forever to the right.
8:20
For example, let's take the 10-adic integer whose digits are all 9 and add 1 to it, right to left. 9+1 is 10, so we write 0 and carry the 1. Then 9+1 is 10 again, so we write another 0, carry another 1, and this just keeps happening. So the sum in this case is 0. This may be a bit of a surprise, but it means that the number consisting of all nines is actually equal to -1.
8:46
We just discovered that the 10-adic integers contain certain negative integers. In fact you can show that the 10-adic integers contain all negative integers. They're already built in without needing to introduce a negative sign.
9:00
We can also multiply 10-adic integers.
9:06
Surprisingly, the result is 1. This means that the 10-adic integer consisting of 6s with single 7 digit is actually 1/3.
9:16
So even some rational numbers are built into the 10-adic integers. But not all. For example, 1/300 has a denominator that is divisible by 10. Since we know the digits of 1/3, we can write 1/300 using powers of 10.
9:33
But dividing by 10^2 shifts all the exponents up by 2.
9:39
Since there are positive exponents now, this is not a 10-adic integer. Instead it's called a 10-adic number.
9:47
Real numbers can have only finitely many digits to the left of the decimal point; 10-adic numbers can have only finitely many digits to the right of the decimal point.
9:57
In order to get all rational numbers, at the very least we need to enlarge the 10-adic integers to include the 10-adic numbers.
10:06
But for the 10-adic numbers to be just as good as the real numbers, we'll want to be able to divide as well as multiply. And this is the catch for base 10. We just saw that we can divide 1 by 3, or 1 by 300, and get 10-adic numbers. But can we always divide a 10-adic number by another 10-adic number, as long as we're not dividing by 0? The first sign that something is wrong comes from our limit of 2^(10^n).
10:32
This was the original 10-adic integer we discovered. Let's call it x. Can we divide other 10-adic numbers by x?
10:40
We're going to go on a bit of a journey here, so bear with me. The powers of 2 in the limit that gave x have the following property. To get from 2^(10^n) to 2^(10^(n+1)), we raise to the 10th power. As we increase n, both powers of 2 in this equation get close to x. And that means that x^10 is actually equal to x. We can even check this for the first few digits by hand, by multiplying x by itself 10 times. After the last multiplication, we should get x back.
11:12
Here's the first multiplication: x times x.
11:19
Wait, what?! We got x back already!
11:23
Well, it turns out that x^2 actually equals x, in addition to x^10 equaling x.
11:29
But this has some consequences, because it means that x times x-1 is 0,
11:37
and neither x nor x-1 is 0. And here's where things really fall apart. If we could divide by x, then x/x would be 1.
11:47
But then multiplying both sides by x-1
11:53
implies that x=1, which it's not.
11:58
So we can't divide by x, because doing so results in a contradiction.
12:04
What we've just seen is that there are certain 10-adic numbers that we can't divide by, even though they're not 0. So the 10-adic numbers? Not such a great place to live.
12:15
The good news is that this problem disappears if we replace 10 with a prime number.
12:21
If p is prime, then the p-adic numbers do support division, of course as long as we're not dividing by 0. The reason that primes have this property is a little outside the scope of this video, but it comes down to the fact that the numbers from 2 to p-2 pair up with each other perfectly, so that when you multiply each number with its pair you get a number that is 1 more than a multiple of p.
12:47
Let's recap what we know so far. The p-adic numbers can't be organized along a number line, and they don't have the best name. But on the bright side, they contain all integers.
12:58
They support addition, subtraction, and multiplication, and, since p is a prime number, they also support division.
13:05
Since they support division and contain all integers, they also contain all rational numbers.
13:11
What about their limit points? Are there any holes in the p-adic numbers?
13:16
There are no holes in the real numbers because whenever you have a sequence of real numbers where every digit stabilizes if you go out far enough, then its limit consists of the stabilized digits, which is also a real number.
13:28
The same idea works for p-adic numbers. There are no holes in the p-adic numbers because whenever you have a sequence of p-adic numbers where each digit stabilizes if you go far enough, then its limit consists of the stabilized digits, and this is again a p-adic number.
13:44
We'll come back to square roots of -1 in a minute. But first let's see some more nice graphics. At the beginning of the video we looked at 2^(10^n).
13:54
Now let's look at 2^(5^n).
13:59
Rather than writing integers in base 10, we'll write them in base 5, where the possible digits are 0 through 4.
14:14
Here's some more data. And they seem to be converging! So, what are they converging to? The limit is some 5-adic integer. Which 5-adic integer is it? Does it have another name? If we call the limit x again, then we can play the same game as before. Both 2^(5^n) and 2^(5^(n+1)) approach x, so x^5=x.
14:43
Can we say anything more?
14:46
Let's square x, like we did for the 10-adic limit earlier.
14:52
When we add 1 to this number consisting of all 4s, we get 0, so this number is -1. This means x^2=-1. So this limit is the analogue of i; it's the square root of -1. This is extremely different from the real numbers. In the real numbers, there is no square root of -1. But in the 5-adic numbers there is.
15:15
We can prove that this limit is the square root of -1 by factoring x^5-x.
15:20
Since the 5-adic numbers support division, the only way for this product to be 0 is for one of the factors to be 0. The first three factors are nonzero, so it must be the last one.
15:33
The existence of p-adic limits like this is actually pretty common. Let's mix things up by looking at a different type of sequence: the sequence of Fibonacci numbers.
15:43
Let's choose p to be 2 and look at the (2^n)th Fibonacci numbers.
15:57
The (2^n)th Fibonacci numbers don't converge 2-adically.
16:01
But if we take every other row, we do get convergence.
16:09
It's not at all obvious, but in fact these two limits are the two square roots of -3/5.
16:16
Be careful not to fall into the trap of thinking that these are complex numbers. These aren't complex numbers! These are 2-adic integers that, when you square them, multiply by 5, and then add 3, give you 0.
16:31
Since the 2-adic numbers contain square roots of -3/5, what about square roots of -1?
16:37
In the 2-adic numbers, -1 is the number whose digits are all 1, since when we add 1 to this number we get 0.
16:46
So what would a 2-adic integer look like whose square is -1?
16:51
There are two possibilities for its last digit -- 0 or 1.
16:56
If it's 0, then 0*0 is 0, so we get a 0 in the product where we want a 1. So the last digit can't be 0.
17:06
If the last digit is 1, then 1*1 is 1, which is what we want. So the last digit is 1.
17:15
What about the second-to-last digit? If it's 0, then 1*0 + 0*1 is 0, which is not what we want. So it can't be 0.
17:26
If it's 1, then 1*1 + 1*1 is 2, so we write 0 and carry the 1.
17:34
This is still not what we want, so the second-to-last digit also can't be 1.
17:39
We've tried both possibilities for the second-to-last digit and neither of them worked, so there is no square root of -1 in the 2-adic numbers.
17:48
What about if p=3? Do the 3-adic numbers contain square roots of -1?
17:54
Not there either. But the 5-adic numbers do contain square roots of -1. We saw this earlier; one of the square roots is the 5-adic limit of 2^(5^n).
18:06
Try this on your own... Pick a prime number p and see if you can build a p-adic integer, from right to left, whose square is -1.
18:14
If you do this for a bunch of primes, you can probably guess a characterization of the primes for which this is possible.
18:21
We've now completed our table of properties.
18:25
So what are p-adic numbers good for? Well, here's one application: When is n^2+7 divisible by a large power of 2? In other words, when is it highly divisible by 2?
18:41
When we plug in the first few values of n, the highest power of 2 we see is 2^5.
18:49
When do we get a value that's divisible by 2^6?
18:53
Well, not till the 11th value, and it's actually divisible by 2^7.
18:59
For 2^8, we have to go farther.
19:03
For 2^9, we have to go up to 75.
19:08
And the next record occurs at 181. And after that, it's not till 16203.
19:16
So what are these numbers? What's a more direct way to find them?
19:21
If we are trying to make something highly divisible by 2, then we want it to have a lot of 0s at the end of its base-2 representation.
19:29
This means that we want n^2+7 to be close to 0 in the 2-adic numbers.
19:35
Turning this approximation into an equation and solving, we see that we want n to be close to a square root of -7, 2-adically, if in fact the 2-adic numbers contain square roots of -7, which is not guaranteed.
19:48
But it turns out that they do, and we can compute approximations to a square root of -7 just like we might compute approximations to solutions of an equation in the real numbers -- using Newton's method. We set up the function that takes x to x minus f(x) over the derivative of f, where f(x) is x^2+7.
20:09
Then we pick a starting value for x and iterate. For example, we might choose x to be 1; then the function outputs -3. Then we plug in -3, and the function outputs -1/3. Then we plug in -1/3, the function outputs 31/3, and so on.
20:29
In the real numbers, this sequence doesn't converge.
20:32
After all, it's supposedly approximating a solution of x^2=-7,
20:37
and the real numbers don't contain square roots of -7.
20:42
But, thanks to the 2-adic numbers supporting division, these rational numbers are also 2-adic numbers,
20:50
and this sequence does converge 2-adically.
20:53
By truncating one of these 2-adic integers, we get an integer n.
20:58
And, sure enough, n^2+7 is highly divisible by 2.
21:04
Isn't that beautiful?
21:07
So the p-adic numbers are worthy competitors of the real numbers. They have many of the major properties that the real numbers have, and, unlike the real numbers, they let us extend the rational numbers to a larger number system in a way that reflects properties of integers that are related to divisibility by the prime p.
21:25
From there, they enable us to use powerful concepts from calculus, like limits, continuity, and derivatives, to get information about integers that we just can't get any other way.
Here to help you learn
Sign in to keep a private conversation with your course tutor.
Ask me anything about the material…
Sign in to chat