Monthly Archives: October 2018

A Simple Proof by Contradiction

Use a proof by contradiction to show that the sum of an irrational number and a rational number is irrational (using the definitions of rational and irrational real numbers; cf p85 of the textbook, or your notes).

Theorem: If r is an irrational number and s is a rational number, then r+s is irrational.

Proof: For a proof by contradiction, assume that the hypotheses are true (i.e., that r is irrational and s is  rational) but that the conclusion is false, i.e., r+s is not irrational.

That means r+s is rational, and so by the definition of rational numbers, r + s = a/b for integers a, b.

Then r = (a/b) - s.  There are two cases for s:

(i) s is irrational: this contradicts the hypothesis that s is rational.

(ii) s is rational: then s = c/d for integers c, d. But then

    \[r = (a/b) - s = (a/b) - (c/d) = (ad - bc)/bd\]

meaning r is rational.  But that contradicts the hypothesis that r is irrational.

Since we get a contra

Proof of “The square of any odd integer is also odd.”

Let’s prove the statement “The square of any odd integer is also odd.”

First we restate the theorem in a way that will lead us towards the proof, by introducing a variable n into the statement of the theorem to represent “any (given) odd integer”:

Theorem: If n is odd, then n^2 is also odd.

In order to prove this, we will need the definition of what it means for a integer to be odd:

Definition: An integer n is odd if n = 2k+1 for some integer k.

Proof of theorem: Assume n is an odd integer.  Therefore, by definition, n = 2k+1 for some k.  Then

    \[n^2 = n*n = (2k+1)(2k+1) = 4k^2 + 2k + 2k + 1 = 4k^2 + 4k + 1 = 2( 2k^2 + 2k ) + 1\]


This shows that n^2 is odd, since n^2 = 2j + 1, where j = 2k^2 + 2k, so n^2 satisfies the definition of being odd.

Getting Started with Python:

We will use the programming language python later in the semester for some programming projects. Python has the advantage of being relatively easy to get started with.

You should do the following:

  1. Create an account on, which is a browser-based coding environment that is designed for teaching and coursework.
  2. Take a look at one of their introductions to python, such as
  3. Since we are going to be talking about (mathematical) sets, get familiar with Python’s sets (e.g., see