maths.freeDiscrete Math & Logic › Direct proof, contrapositive and contradiction

Direct proof, contrapositive and contradiction

The three basic ways to prove an implication, when to reach for each, and how to write the proof.

Most theorems have the shape "if \( P \) then \( Q \)". A direct proof assumes \( P \) and reasons forward, one justified step at a time, until it reaches \( Q \). To show that the sum of two odd integers is even, write them as \( 2a + 1 \) and \( 2b + 1 \): their sum is \( 2(a + b + 1) \), which is even. Unpacking definitions into algebra like this is where most direct proofs start.

A proof by contrapositive proves \( \lnot Q \Rightarrow \lnot P \) instead. The two statements are logically equivalent, as the example's truth table shows, so proving one proves the other. It helps when \( \lnot Q \) gives you something concrete to work with. To prove "if \( n^2 \) is even then \( n \) is even", the direct route starts from \( n^2 = 2k \) and gets stuck taking a square root. The contrapositive starts from \( n = 2k + 1 \) and computes \( n^2 = 2(2k^2 + 2k) + 1 \), which is odd. Do not confuse the contrapositive with the converse \( Q \Rightarrow P \), which is a different statement and may be false.

A proof by contradiction assumes the statement is false and derives something impossible. To show \( \sqrt 2 \) is irrational, suppose \( \sqrt 2 = a/b \) in lowest terms. Then \( a^2 = 2b^2 \), so \( a^2 \) is even, so \( a \) is even (the contrapositive result above), say \( a = 2c \). Then \( 4c^2 = 2b^2 \) gives \( b^2 = 2c^2 \), so \( b \) is even too, and \( a/b \) was not in lowest terms after all. Euclid's proof that there are infinitely many primes has the same shape: given any finite list of primes, their product plus one has a prime factor that is not on the list.

Picture it: a direct proof is a road from \( P \) to \( Q \). The contrapositive is the same road driven backwards from "not \( Q \)" to "not \( P \)". A contradiction proof is a map of every road leaving "not the theorem", showing that each one ends at a cliff.

Think it: try direct proof first. Use the contrapositive when the conclusion is a negative or an "is not" statement, or when its negation is easier to write down. Use contradiction for statements like irrationality or infinitude, whose natural negation hands you a finite list or a fraction to work with. And state clearly at the start which method you are using, so a reader knows what is being assumed.

작업 예제 · truth table of (p -> q) iff (not q -> not p)

Truth table of (p -> q) iff (not q -> not p)

단계별로

  1. \left(p \Rightarrow q\right) \Leftrightarrow \left(\neg q \Rightarrow \neg p\right)

    2 variable(s) → 4 rows. Fill in every combination.

  2. \

    A tautology (always true).

답을 드러내세요
\left(p \Rightarrow q\right) \Leftrightarrow \left(\neg q \Rightarrow \neg p\right)

이제 너 문제를 선택하거나, 타이핑하거나, 자신만의 문제를 그려보세요. 모든 단계는 그림으로 표시되며, 답은 질문을 할 때까지 숨겨져 있습니다.

자신의 작업을 유지

무료 계정은 모든 수업에 노트를 추가, 당신이 완료 한 기록, 당신이 해결 한 문제를 한 곳에, 그리고 당신이이 페이지에 대해 물어 수업 지도자. 수학 자체는 모두에게 열려 있습니다, 로그인 여부.

가입하기 로그인

여기서 사용된 기호

기호를 탭하면 전체 정의, 이미지 및 각 문자의 의미를 확인할 수 있습니다.

어떻게: Direct proof, contrapositive and contradiction

  1. Write the statement as "if P then Q" and identify P and Q exactly.
  2. Unpack every definition in P and Q into algebra (even means 2k, divides means a multiple).
  3. Try a direct chain from P to Q; if it stalls, write the contrapositive and try that.
  4. For contradiction, assume P and not Q together and aim for a statement and its negation.
  5. Finish by saying what has been proved and by which method.

사람들이 묻는 질문

Is every proof by contrapositive also a proof by contradiction?

It can be rephrased as one (assume P and not Q, derive not P, contradiction), but the contrapositive is cleaner: it has a definite goal, not P, rather than any contradiction at all.

Can an example prove a "for all" statement?

No. Examples can suggest a pattern and a single counterexample can disprove a universal statement, but proving it needs an argument that covers every case.

What makes mathematics "discrete"?

It deals with separate, countable objects (integers, graphs, statements) rather than continuous quantities. No limits, no infinitesimals; instead induction, counting and logic.

How does a proof by induction work?

Show the statement for the first case, then show that whenever it holds for n it holds for n + 1. Like dominoes: the first falls, and each knocks over the next.

What order should I take these lessons in?

Logic and proof first, because every later lesson proves things. Then induction, sets, relations and functions, counting, recurrences, graphs, Boolean algebra and automata, and finally algorithms and complexity, which use nearly everything before them.

Is discrete mathematics the same as the maths of computer science?

Largely. Data structures are graphs and trees, correctness arguments are induction, running times are recurrences and sums, circuits are Boolean algebra, and what a computer can do efficiently is the subject of the last lessons. It is also ordinary mathematics in its own right.

Do I need calculus for this course?

No. School algebra is enough. A little familiarity with limits helps when comparing growth rates, and the lesson on asymptotic analysis explains the one limit fact it uses.

에 더 Discrete Math & Logic