every statement in mathematics is either true or false. If statement $P$ is not false, it means $P$ must be true.
A proof by contradiction shows that some statement $P$ is true by showing that $P$ isn’t false.
First example (set cardinalities). Is there a “largest” set? Is there a set that is bigger than every other set?
Notes: announce a proof by contradiction, and show what we’re assuming to be true. In CS 103, we need to include these three pieces
Another example: a Latin square is an $n \times n$ grid filled with the numbers $1,2,\dots,n$ such that every number appears in each row and each column exactly once. The main diagonal of a Latin square runs from the top-left corner to the bottom-right corner. A Latin Square is symmetric if the numbers are symmetric across the main diagonal.
Let $k$ be the number of times $r$ appears above the main diagonal. Since the Latin square is symmetric, there are also $k$ copies of $r$ below the main diagonal. And because $r$ doesn’t appear on the main diagonal, that accounts for all copies of $r$, so there are exactly $2k$ copies of $r$.
Independently, we know that $r$ appears $n$ times in the Latin square, once for each of its $n$ rows.
Combining these results, we see that $n=2k$. This means that $n$ is even, contradicting the fact that $n$ is odd. We’ve reached a contradiction, so our assumption is wrong. Therefore, all symmetric Latin squares of odd size $n\times n$ have each of the numbers $1,2,\dots,n$ on their main diagonals. $\blacksquare$
Implication: If $P$ is true, then $Q$ is true.