Read this lesson as text

Direct Proof

Math for CS · Axiom Academy

The most straightforward method: assume the hypothesis and derive the conclusion A direct proof is the most intuitive form of mathematical reasoning. You start with known facts and assumptions, then use logical steps to arrive at the conclusion you want to prove. Use definitions, axioms, and logical deduction Why it works: If every step is valid and P is true, then Q must be true. Claim: If n is even, then n² is even. By definition of even, n = 2k for some integer k Then n² = (2k)² = 4k² = 2(2k²) Since 2k² is an integer, n² = 2(2k²) is even by definition Therefore, if n is even, then n² is even. QED Claim: If n is any positive integer, then the sum of the first n positive integers is n(n+1)/2. The sum is: 1 + 2 + 3 + ... + n We can write this sum twice in different orders: S = 1 + 2 + 3 + ... + n S = n + (n-1) + (n-2) + ... + 1 Adding these equations: 2S = (n+1) + (n+1) + (n+1) + ... + (n+1) = n(n+1) The hypothesis (P) is easy to work with There's a natural chain of logical reasoning You can clearly define key terms and build from them Be explicit about what you're assuming State definitions as you use them Show each logical step clearly End with "Therefore" or "QED" to mark completion Test your proof with specific examples first

This is the written version of the interactive lesson above. See the full Math for CS course.