Introduction to Demonstrative Mathematics

I am rereading William Dunham’s Journey Through Genius as I prepare to teach another semester based on it. Immediately he brings up an interesting question:

When did math begin, and how do we decide? What is math?

Dunham hopes to narrow questions like this down a bit by looking for the beginning of “demonstrative mathematics”. What is this? Before we get very far, we get to another categorical separator: arithmetic and geometry. What are they and how are they different?

Math, or any other discipline, as you certainly know is associated with a realm of knowledge, its content. The way we think about this typically is a set of objective facts and valid procedures. But as we get more involved, this naive view is limiting. Disciplines and their knowledge are marked out from everyday thinking and other disciplines in terms of their

  • Values
  • Methodology – how knowledge is produced
  • Epistemology – what counts as knowledge
  • History

This is as true of math as it is the social sciences. So when Dunham wants to trace the beginnings of math, and brings up the difference between arithmetic and geometry, he is coming from a different place than you, most likely. He isn’t talking about two different areas of content, different math classes you take in school. He is talking about the history of mathematical knowledge production in the world, about the advent of disciplinary frameworks within which mathematical knowledge is sought, organized, and shared.

“Demonstrative” refers to values, methods, epistemology, as well as its origins and transformations throughout the millennia. For those ancient Greeks, and for us as we adopt this classical stance on mathematics, math is about more than collecting and using facts about numbers and shapes. In this world, mathematics primarily consists of theorems and their proofs, arguments for the truth of a proposition based on simpler, already accepted ideas.

Certainly there are sometimes proofs and other arguments in math classes. But they are minimized in a variety of ways. What matters in most math classes is getting the right answer; how you got there is something to worry about only is you need partial credit, and why it all works isn’t something covered in the syllabus or measured on the test. For Dunham and mathematicians generally, its everything. Here, asking why instead of what or even how is the most important thing. So when he asks us to appreciate math, he is asking us to learn to care about why. At its heart, demonstrative mathematics is a commitment to this value. All the rest: proof techniques, the idea that you need to prove things based on an initial set of axioms, and the school-house formulas and facts that we are asked to memorize come after. Let’s look at them generally.

Values – why? Truth is about what we clearly understand, not what works. Knowledge is why something is true, not its fact, or its use. Abstraction and generality are more important than particular cases. Building the complex from the simple.

Methodology – Proof – a logical connection between what we already know and what we want to show. Abstraction is actively forgetting particular details to look for similar structures in disparate places. There are many kinds of proof, and an axiomatic framework that grounds and connects them, a set of simple facts and rules you assume at the outset.

Epistemology – We know things we have proven, nothing else. Proof is not a computer program, but a form of persuasion. Your argument must convince a careful and possibly skeptical reader. Knowledge is not given by authority. Axiomatic systems organize knowledge to fit together, allowing us to start with simple ideas, and get somewhere complex without the danger of circular reasoning.

History – The simple truths we start out assuming, in what sense they are True, and even what counts as a convincing argument have all evolved through the ages. Ideas impossible in one framework end up founding new mathematical systems

As we continue, we are not only talking about content you may be unfamiliar with, or new techniques, we are also adopting a new perspective on math, different from everyday thought and what you likely learned in school. Studying this stuff asks you to care about why.

One of the most interesting aspects of taking on these values and looking at them play out historically, is that we get to dispel another popular myth about math: the idea that always has been and always will be and that it is always the same. We often associate math with certainty, but we often confuse this with absolute truth and total determinism. In the history of math though, what counts as how and why have changed over the millennia. Impossible ideas from one era become common sense in another. And yet, its not like ancient science, where pretty much everything has been thrown out as nonsense today. The story of what still works today that was invented in antiquity, how many possible contradictory truths there might be, and the evolution of fantastic new landscapes of thought are what make math-land a really worthwhile place to visit.

Dunham gives us access to many of these moments throughout history, where questions of why lead somewhere new. The difference between arithmetic and geometry is the first hint at one of these moments. Arithmetic and geometry in this story, as I said, are not different sets of content (i.e. one is about shapes and the other, numbers) but are distinct frameworks for seeking, encoding, and claiming knowledge. They are two different sets of values concerning what is the most basic and true ways to understand the cosmos. Many ideas can be expressed in both of these frameworks, while others are simple in one and impossible in another. A bit more extreme than the differences between French and Estonian wording of a concept, in math, we end up in the position of not being sure what a number is, or what counts as a valid argument. Those who are committed to finding the Truth want to know in these situations which is the “real” way to understand reality.

The Parable of $\sqrt 2$

This is all a bit abstract, so maybe a brief example will help understand the idea that the framework we use for thinking determines what exists as well as give us some practice together acting like mathematicians, leaning to ask and care about why.

$\sqrt 2$ is a number you are doubtlessly familiar with. But how well do you really know this little guy? What is $\sqrt 2$ really? How do you know what it is?

Before getting to how this simple number lies at the center of a major schism in Greek mathematical thought, we need to unpack the folk-epistemology of $\sqrt 2$ and similar numbers typically received through modern schooling. If you are like most people, you think that $\sqrt 2$ is something you put in a calculator to find.

What you might think $\sqrt 2$ is.

When you think about this number, you probably think of the decimal given by the calculator as the actual number—the hard facts on the ground—and $\sqrt 2$ as a convenient notation secondary to the actual thing itself. But this is the opposite of how all of your math teachers and any mathematician, including the ancient Greeks, thought about it. To them $\sqrt 2$ (not those Greeks—they didn’t have hindu numerals or symbols for square roots), the written mark that represents the idea of a number whose square is 2 is what the number is. What the calculator churns out is not only secondary to this idea, but also only an approximation of the actual number. You do probably know that the “decimal goes on forever”, but to a mathematician this means that any decimal, no matter how many digits, fails to be $\sqrt 2$. The decimal framework is not up to the challenge of representing this number terribly well, a weakness which is typically repaired by papering over it with typography, the ellipsis: “…”

So what is the idea of $\sqrt 2$ if not a decimal waiting to be found? From the viewpoint of arithmetic, $\sqrt 2$ is first and foremost the question “Is there a number, when multiplied by itself, is equal to two?” If we think there is, we can then later ask, “Around how big is it?” and use a calculator (or a fantastic algorithm—way better than the one you learned in school—maybe invented by the ancient Babylonians around 1800 BCE) to answer this question, but it is a follow-up question. If we are doing math, then we want to know what numbers are, what kinds of questions we can ask about them and get numbers for answers.

And this is where $\sqrt 2$ starts to get interesting. After all, who says there is such a number? What counts as a number? What if there is no answer to the question, “What number, when multiplied by itself, is equal to two?” Even in our modern age of calculators, Google, and Justin Bieber, maybe its not so simple. If I take the value for $\sqrt 2$ Google gave me above and multiply it by itself, Google doesn’t give me 2.

Google lied to me and you.

“Close enough,” you say. Here again, another set of values may intercede. Not close enough for me. In math, things are supposed to be exact. I want the right answer, not a close second to it. It seems that no matter how many decimals my calculator uses, if it multiplies the way we learn in school, it will never give me a number that squares to 2 (some calculators find tricks to avoid this and cheat by multiplying in a different way).

In addition to not being happy with “close enough”, a mathematician, caring about why, wonders if this is is really impossible or if we just haven’t used enough digits or guessed the right number. Impossible is not the dame thing as hard or “I haven’ found the answer yet”.

The Greeks, although they had different machinery for doing arithmetic, faced the same problem. It is possible to find fractions whose square is close to 2, but no one could find one whose square was 2. It turns out that arithmetic itself, the framework in which we understand the question “What number, when squared, is 2?”, was in classical Greece as is the typical decimal system above, not equal to providing a number as the answer. There is a clue to this in the name you likely know for numbers like $\sqrt 2$: irrational.

Once again, it’s time to dispel a common misunderstanding that comes out of school. Most people who remember any of this, the good students in High School Algebra class, will know that

An irrational number is one whose decimal goes on forever without pattern.

And its not that this idea is false. This is a correct characterization. But it doesn’t help us understand why. Rational and irrational numbers are not a technical distinction that matters to calculation. For even the most careful physicist, you can go out enough decimals and then not really care. Understanding irrational numbers as a property of their decimals is skipping to the end of the book to see who dies without even learning the characters’ names first. You don’t even know how to care.

The real definition of irrational number is a number that is not-rational. Nowadays, we tend to interpret this as meaning a number that doesn’t make sense, and this reinforces the decimal interpretation, but once again, this is getting the story backwards. The word rational comes from the word ratio—essentially another word for a fraction. An irrational number is one that is not a fraction. When we say that $\sqrt 2$ is irrational we mean that there are no whole numbers $a$ and $b$ so that $\sqrt 2 = \frac{a}{b}$.

Now that we see what it really means to call $\sqrt 2$ irrational, we can appreciate two facets of its story as it relates to arithmetic and geometry and classical Greek mathematics.

  1. How do we know that $\sqrt 2$ is irrational? That out of all the possible choices for $a$ and $b$, even with a ultra-parallel quantum computer, we could never find a pair that works?
  2. Can we begin to see that the framework we use to describe numbers also serves to decide what numbers are? For Greek arithmetic, saying $\sqrt 2$ is irrational is the same as saying it doesn’t exist, it’s not a number. But in their geometry, we’ll see that the same number is very easy to produce.

The first of these introduces us to one of the most fantastic methodologies basic to “demonstrative mathematics”, something that math can do that no one else can. It’s not too technical, you don’t need to remember much school math to get it, but it is real math: there is work involved.

The second facet is not technical; it is philosophical. Nevertheless it is a bit harder to wrap your head around at first. It requires you to realize that when it comes to tricky numbers like $\sqrt 2$, you have long accepted a vague idea of why these are numbers. This vague idea rests on two millennia of innovation in understanding numbers, and is not basic or clear. You have to learn how to discard all this baggage to be able to see what this is about in order begin to see what numbers really might be.

$\sqrt 2$ Is Irrational

The mathematical magic we employ to prove that $\sqrt 2$ is irrational goes by the name “proof by contradiction”. Dunham and the Greeks call it reductio ad absurdum and he really plays it up as something mysterious and technical. And even though it has a reputation for turning novices around in circles, it’s really just an aspect of common sense, a form of argument we are actually familiar with even though it doesn’t go by a name in everyday speech. Knowing how “proof by contradiction” works and what it can do not only provides a powerful analytic tool, but also helps a great deal in seeing the distinctions in epistemology and values between what Dunham and mathematicians call math and the folk ideas we have about it. In short, with tools like this, math often avoids calculation instead of living by it.

Recall, if we want to prove that $\sqrt 2$ is irrational, we need to show that there are no whole numbers $a$ and $b$ so that $\sqrt 2 = \frac{a}{b}$. We cannot and do not try—to use a supercomputer to go through all the possible choices. Obviously the Greeks did not have this kind of computational muscle at their fingertips, but can you see why such a method would never result in certainty? Even if we tried a trillion billion possible numbers, there would still be more out there. Instead, we prove that there is a logical inconsistency in the idea that such a fraction exists. That is, if there were such an $a$ and $b$, something else would go horribly, horribly wrong, not just something awful but something we already know to be untrue. The logical conclusion of this line of reasoning would be that there are no such $a$ and $b$.

Proof by contradiction works by assuming the opposite of what you want to prove. Then you show that this assumption leads to a logical contradiction. The conclusion you reach in the end is that the original assumption is false; that the opposite of it is thus true. A teacher of mine used to phrase “proof by contradiction” as an argument you’re having with someone you don’t really like, “Okay smart guy, let’s say you’re right…”. You string the interlocutor along until Let’s see it in action.

Okay, smart guy, let’s say you’re right. Let’s say there exist $a$ and $b$ so that

$\sqrt 2 = \frac{a}{b}$.

Just to make things clear, we also assume that the fraction $\frac{a}{b}$ is in lowest terms. In particular, $a$ and $b$ are not both even. If they were, we could reduce the fraction and get new, smaller $a$ and $b$.

The next step is usually presented as an algebraic one: square both sides of this equation and it will still be true. But in fact, it is more basic. When we say we assume that $\frac{a}{b}$ is $\sqrt 2$, we mean that if we multiply $\frac{a}{b}$ by itself, we get $2$.

$2=\frac{a^2}{b^2}$.

And no one likes fractions, so let’s move $b^2$ to the other side (i.e. multiply both sides by $b^2$).

$2b^2=a^2$.

Now we start asking questions about both sides of this equation. Since they are equal, if the left side $2b^2$ is even—it is, regardless of what $b$ is—then so is the right side $a^2$. While the possible choices for $a$ and $b$ are infinite, there are a very limited set of possibilities for their parity, whether they are even or odd.

  1. $a$ is odd and $b$ is even.
  2. $a$ is odd and $b$ is odd.
  3. $a$ is even and $b$ is odd.

Any $a$ and $b$ that would work fall into one of these three cases (since we already are in a situation where $a$ and $b$ can’t both be even). We will see that in each of these cases, there is a contradiction; we end up with something that cannot possibly be true.

The first two cases are immediate and work the same. We don’t care what $b$ is, $2b^2$ is even, and if $a$ is odd, so is $a^2$ (why?). But an even number cannot equal an odd number. That is our contradiction.

The third case is harder, but not too hard. Both sides are even in this case, $2b^2$ and $a^2$. But $2b^2$ is not very even. Since $a$ is even, there is another number $c$ so that $a=2c$. So $a^2=(2c)^2=4c^2$, and we have

$2b^2=4c^2$.

Now, divide both sides by 2. We get

$b^2=2c^2$.

Recall, $b$ is odd in this case. So is $b^2$. But not $2c^2$. Again, we have a contradiction.

We’re done. $\sqrt 2$ is irrational.

“Wait, what?”

To recap, while there are infinite choices for $a$ and $b$ that might work, their possible parities are severely constrained. There are only four possible combinations of even and odd, and one of those—$a$ and $b$ even—can be turned into another case simply by reducing the fraction. When we assume that there is a solution to $\sqrt 2 = \frac{a}{b}$, each of these supposed possibilities turns out to be impossible. Hence, there never was a solution.

Is $\sqrt 2$ a Number? Does it exist?

This question seems silly at first. Of course it exists. Watch: $\sqrt 2$. See? I just wrote it down. Boom. Not convinced? Look, I’ll plug it into my calculator. Or, even easier, Google.

A proof of the existence of $\sqrt 2$

There. See?

As I said, it is hard to see why we might begin to question the existence of $\sqrt 2$. But this is authority and habit speaking, not reason. If we start asking where numbers and their operations come from, we can begin to see that arithmetic and geometry are two ways to think about these things. At first, when we consider some basics, there are some happy coincidences that lead us to believe there is something real out there, the idea of numbers and what we can do with them, to which these are different but comparable roads.

We usually take math to begin with the natural numbers ({1,2,3,4,5,\ldots}). And for each number we can for example draw a dot or a segment of a line, connecting the act of counting to things in space. Adding in this space is something we all teach our children to do. And there are already a bunch of interesting things to notice in this representative framework, both from the practical matters these calculations may refer to and internal to the method of representation itself. Specifically, arrangements of the dots reflect properties of the numbers represented. A practical property is evenness and oddness, closely related to the act of dividing stuff among people. Multiplication is the same as grouping, say 3 groups of five dots, and leads us to the currently universal connection between the arithmetic act of multiplying two numbers and the geometric interpretation of it as the area of a rectangle with sides equal in length to those two numbers. As I said, this is not all practical, some of what comes out of this association is not about the outside world these numbers represent, but more about the internal properties of the representations.

A good example relevant here is square numbers. We call a number like 9 square because we can lay 9 dots out into a square. Certainly squares do exist in the outside world as a special kind of rectangle: if you want to make a square room, you need to measure the sides the same as each other. But notice that something important from the geometric interpretation works its way back to arithmetic. Square becomes a property of a number itself and an act of arithmetic even when geometry is not specifically around.

Although its a bit harder to see as invented, evenness and oddness are linked as characterizations of numbers between arithmetic (that you may want to divide them by two) and geometry (there is one dot left over when you separate the dots into two equal groups). Likewise, subtraction—taking away dots for example—and division—inheritance, taxes, and paying workers were the chief motivating practical applications in antiquity apparently, leading to fractions when the number of goods does not match the number of recipients—of whole numbers became closely linked in terms of arithmetic and geometry. Answers to questions framed arithmetically could be found in geometry and vice versa.

The functional system of arithmetic in use in many societies, and still probably what most people seem to operate—not that well all the time—with consists of whole numbers, adding, subtraction, multiplication, division, and another kind of number, fractions of whole numbers. With the exception of negative numbers, 3-5 was not considered to make sense by a majority of mathematicians until sometime between 1600 and 1800, this is a nice, closed system. All the parts work together, and its easy enough to be so satisfied with it that you may say, “This is what numbers are; there is nothing else.”

In particular, the proof above that there is no fraction which, when squared yields 2, answers the question, “Is there a number whose square is 2?” in the negative. There is no such number as $\sqrt 2$. This might seem like a bit of a cheat. But arithmetic has plenty of negative existence proofs like this, many of which you believe in. How about, “Is there a number, when squared, becomes -1?” I believe there is but you probably don’t. And in fact, there’s no real loss in adopting either of these stances, noting that your choice is relative to the framework in which you are working. The problem is that in geometry-town, something that should simply be another way of looking at the same immortal Truth of the cosmos, $\sqrt 2$ dead simply, obviously exists. Here’s a picture of it.

Now to be fair, this is not obvious to everyone, you need to know that there is a relationship between the side lengths of a right triangle. Usually this goes by the name “The Pythagorean Theorem” even though there is nothing resembling evidence that Pythagoras ever did any math, much less proved this theorem (Martinez, ???).

Nomenclature aside, the theorem, probably the most commonly known bit of mathematical knowledge beyond simple arithmetic, says that if you have a triangle with a right angle and with sides of length $a$, $b$, and $c$, where $c$ is the hypotenuse (aka side opposite the right angle), then $a^2+b^2=c^2$. Nowadays we write this in symbols and equations, i.e arithmetically, but it is equally a statement about the area of squares.

In the case we care about, if you want to make a square with area 2, simply start with a square of sides (and area) 1. Connect two corners of the square, making a right triangle. Then, by the ____ Theorem, a square with sides equal to the hypotenuse of that triangle will have area 2. In other words, the length of the hypotenuse is $\sqrt 2$.

Historically, the Greeks had a lot of faith in the idea that their mathematical investigations were getting at the Truth of the cosmos, undeniable facts. That’s why they made such a big deal about proofs. It was important to not only be sure that you were right, but also in the line of reasoning that leads to those convictions. To them, there was no relativistic “It depends of how you want to look at it,” and even though professional mathematicians have been typically more detached since the middle of the 1800’s, laypeople can understand this, “Forget how you look at it. Does it exist or not!?!” As a result of this crisis, the Greeks adopted geometry as the one true road to mathematical knowledge, and left arithmetic largely by the wayside, and also as an spect of their desire to uncover universal Truth, also largely left behind any connection between their mathematical advancements and practical problems involving shape and quantity. In Euclid’s Elements, the ____ Theorem (Proposition 47) establishes the equality of areas of squares, not equivalence of square numbers. The domination of geometry is not total, there is quite a bit of number theory for example, but ideas relevant to both arithmetic and geometry are handled definitively in terms of shapes. Geometric ideas are what convince.

Back to Disciplinarity

To care about a question like, “Is there a number whose square is 2?” requires a certain set of values that mathematicians share and which are sometimes distinct from those held in society generally or within other disciplines. Usually we notice this distinction in whether an approximate versus an exact answer is called for, but for mathematicians, the exactness of $\sqrt 2$ is not really about orthography or pedantry, it is a perspective on what counts as knowledge and how that knowledge may be arrived at. That perspective not only varies among fields but within them and throughout the history of a discipline, as we have seen. What a number is, what gets to count as a number, has changed greatly over time. It is as closely connected to our ideas about what we do with numbers as the numbers themselves. The crisis with $\sqrt 2$ we have witnessed is just a small part of the story.

Another value held by mathematicians relevant here is curiosity. Really, who cares whether $\sqrt 2$ exists? A priori, there are no practical consequences in the world of this question, so why bother? Mathematicians want to know the consequences of systems of thought. Mathematicians not only try to answer questions, but also ask them in the first place. Abstraction and generalization, in addition to verification and systemization, are common roads their curiosity takes. If you notice something is true in one place, is it also true in another? Is it always true?

Perhaps the most satisfying kind of question to ask and answer, the root of the “aha!” or “eureka” moment so emblematic of the discipline is, “Are there hidden connections between seemingly disparate things? Are these two things, which seem different, actually understandable as two instances of a third, more primitive, thing?”

Not all mathematicians are curious about the same thing, but they are all curious. Until you share that curiosity, you are not doing math, just following orders. It doesn’t matter how many tests you pass. If that curiosity consumes your life, or a great portion of it, that is when you become a mathematician.

There are a host of related issues and questions we could begin to look into at this point:

Geometry and Impossible Numbers

Greek geometry is not synonymous with a study of shape and proportion. There are very strict rules unimportant elsewhere. Just as fractions in one way expand arithmetic but are insufficient to describe enough numbers to satisfy us, there are numbers and operations which seem plausible in geometry but are nevertheless impossible in the Greek system:

  • The cube root of 2
  • The trisection of an arbitrary angle – notice this is easy for arithmetic and fractions
  • A square equal in area to a circle
  • To draw a parabola
  • -1

We glossed over the basic connections between geometry and arithmetic. Although it is easy to see how to construct addition and multiplication, and even supposedly hard things like $\sqrt 2$, other connections are more obscure. For example, starting with a unit length (aka 1), how do you get a basic fraction, like $\frac{1}{7}$?

Practical Matters and Actual Calculation

We have talked about the existence of $\sqrt 2$ and shown an approximate value in our modern decimal number system. But how, other than “calculators are all powerful” do we find a fraction or decimal that is close to $\sqrt 2$? While we typically enshrine the Greek value to establish the a priori existence of mathematical entities, we don’t pay much attention to the fact that they don’t spend much thought on actual computation. If we need to build something, how do we know how to measure materials when such ideal lengths are involved? What practical uses require what level of precision in approximating something like $\sqrt 2$? What affordances are important in the method of approximation or other sorts of arithmetic? Efficiency? Given what tools? Understandability? Reliability in the hands of novices or hourly workers? The amount of other things you need to assume to believe they work? That they give us a chance to think about how arithmetic works so as to devise new algorithms? Some examples:

The “Babylonian” method of computing square roots. It’s likely really old, but actual historical evidence in antiquity is scant. As long as you can learn to stomach some basic arithmetic with fractions, it is tremendously efficient, and makes sense. I have no idea why people don’t learn it in school. Try it on $\sqrt 2$ without a calculator.

Did you learn how to compute $\sqrt 2$ by hand in school? How? How does this method compare to the Babylonian method in terms of various affordances like those listed above?

In JTG, Dunham provides 3 methods for approximating $pi$. They can be compared in terms of their affordances. It may also be interesting to divide these judgements among different demographics of use? Again, who needs or needed to do this, and how does that help determine what a good method is?

What calculations do you encounter in your life and work? How do you carry them out? What tools do you use? Where would you be most lost without some form of calculator?

Generalization

We know that $\sqrt 2$ is irrational. What else is?

  • $\sqrt 2 +7$?
  • $\sqrt 3$?

These seem like obvious “yes” answers, but how do we know? Can you prove it clearly? In the first one, it seems impossible that 7 could do anything to the irrationality of $\sqrt 2$ but how do you know for sure? How could you convince someone who wasn’t? The trick

For the second, could the same proof, pretty much, work? What needs to be changed, and how does this help establish the irrationality of even more numbers? Can you improve upon doing these one by one? What would you need to be able to state and prove the irrationality of all the “obvious” irrational numbers?

Can any of this be extended easily to other roots, like $\sqrt[3] 2$?

The Integers Can Be Factored Uniquely

Often in math, individual problems that we might otherwise solve through specific arguments, like the irrationality of $\sqrt 2$ given above and its generalization to other roots and other numbers, may end up being rather trivial given a new way of looking at things, the assumption of other facts. In this particular case, there is a way of thinking about whole numbers you already know that is capable of solving all of these questions at once. It goes by the name of unique factorization.

You know that any whole number I give you, be it 6, 15, or 436,569,861,112,345, can be decomposed into basic building blocks. These blocks are called primes, and they’re special because they cannot be further divided. Furthermore, you know that the list of primes you get is the same every time and that two different numbers always have different factorizations.

  • $6 = 2\cdot 3$
  • $15 = 3\cdot 5$
  • $436,569,861,112,345 = 5\cdot 29\cdot 8539\cdot 8753\cdot 40283$ (How did I find this out?)

Prime factorization is like fingerprinting for whole numbers. And if we believe this—or if we go to the trouble of proving it from first principles—our problems with irrationality are largely gone.

First of all, notice that the idea that two fractions could multiply together to be a whole number is a little weird. Say we have a faction in lowest terms. This means none of the primes in the numerator are shared by the denominator. That is, if we have a fraction $\frac{a}{b}$, then $a$ and $b$ don’t share any prime factors; there is nothing to cancel. Squaring the fraction does not change this. $a^2$ and $b^2$ don’t share any primes. So there’s no way in hell that you could find

$$\frac{a}{b} = \sqrt 2$$

since there’s no way to square a fraction and have the denominator somehow cancel out.

Notice that this assures us not only that $\sqrt 2$ is irrational but the square root of any prime $p$ is irrational too. There’s no fraction that could do the job of $\sqrt p$ and the fact that primes are indivisible in the whole numbers means there no other way to do it.

The roots of powers of primes are just as easy. Say $s = p^d$. Then $\sqrt s$ is irrational precisely when $d$ is an odd number.

With just one more fact, we can decide the irrationality of $\sqrt n$ for any whole number n. We need to know or believe that

$$\sqrt{ab} = \sqrt a\sqrt b$$

for any whole numbers $a$ and $b$. Now certainly this is something your algebra teachers hopes you remember (and to avoid a related but generally wrong implication $\sqrt{a+b}=\sqrt a + \sqrt b$). You might ask again, as with prime factorization, why this is true. Normally I would leave that to you. But I think it’s a good time to introduce another typical form of proof in mathematics.

Let’s say we want to prove that $\sqrt{ab} = \sqrt a\sqrt b$ for any whole numbers $a$ and $b$. Just as we did with our proof using $\sqrt 2$, the first thing we need to do is rewrite what we want to prove in terms of what square roots mean by definition. Since we don’t know much about $\sqrt n$ in general, it would be hard to reason with them. But we do know that talking about square roots is just another way of talking about squares. When we say we want to prove $\sqrt{ab} = \sqrt a\sqrt b$, we equivalently want to show $(ab)^2 = a^2b^2$. Seems obvious enough, right? All we had to do was unpack what we wanted to prove in terms of what we already know. Of course, if we wanted to take this line of reasoning to its root, we would go farther in our questioning, but I think its fine to stop here for now.

Why do we need the basic fact that $\sqrt{ab} = \sqrt a\sqrt b$ to decide the rationality of any $\sqrt n$? Because this allows us to make use of the prime factorization of $n$ to answer the question for us. Since

$$n = {p_1}^{d_1}\cdot {p_2}^{d_2}\ldots {p_k}^{d_k},$$

for some primes and their powers,

$$\sqrt n = \sqrt{{p_1}^{d_1}{p_2}^{d_2}\ldots {p_k}^{d_k}}.$$

And since we know that $\sqrt{ab} = \sqrt a\sqrt b$, we can say that the square root of $n$ splits up among its prime power factors.

$$\sqrt n = \sqrt{{p_1}^{d_1}} \sqrt{{p_2}^{d_2}}\ldots \sqrt{{p_k}^{d_k}}.$$

Hence $n$ is irrational if any of the $d$’s are odd. $n$ is rational otherwise.

The framework of unique prime factorization gives us even more. Let’s say we want to know about $\sqrt[3] n$, $\sqrt[4] n$, or even $\sqrt[m] n$ for an arbitrary whole number $m$. The same argument works, but instead of asking whether the degrees of primes present in $n$ (i.e. the $d$’s) are even or odd, we ask if all of the $d$’s are evenly divisible by $m$ (mathematicians just say divisible and write $m | d$).