maths2u
Tier
⌕ Search ⌘K
Theorem

The binomial theorem

T-028Home MU-105Threads structure · number
Statement

Let \(R\) be a ring with multiplicative identity \(1\), and let \(x, y \in R\) be two elements that commute with each other, i.e. \(xy = yx\). Then for every integer \(n \ge 0\), \[ (x+y)^n \;=\; \sum_{k=0}^{n} \binom{n}{k}\, x^{n-k} y^{k}, \] where \(\binom{n}{k} = \dfrac{n!}{k!\,(n-k)!}\) is the binomial coefficient (a non-negative integer), the integer multiple \(m \cdot r\) means the \(m\)-fold sum \(r + \cdots + r\) in \(R\), and \(x^0 = y^0 = 1\) by convention. In particular the statement holds for real numbers, complex numbers, polynomials, and any commutative ring; it holds in a noncommutative ring for any pair of commuting elements.

Why it matters

The binomial theorem is the fundamental bookkeeping device of algebra: it converts a power of a sum into a sum of monomials with completely explicit integer coefficients. Almost every counting argument that touches subsets, every generating-function manipulation, and every estimate of the form \((1+\varepsilon)^n \approx 1 + n\varepsilon\) rests on it. It is the discrete ancestor of Taylor's theorem: the coefficients \(\binom{n}{k}\) are precisely the values \(\frac{1}{k!}\frac{d^k}{dt^k}(1+t)^n\big|_{t=0}\).

It also marks a genuine boundary in mathematics. As stated it is a purely algebraic, finite identity, valid over any ring. Newton's extension to arbitrary real exponents produces an infinite series and belongs to analysis, where convergence must be earned. Keeping the two versions apart is one of the first exercises in mathematical hygiene a degree course demands.

Hypotheses
Hypothesis.\(n\) is a non-negative integer. For \(n = \tfrac{1}{2}\) the right side would be a sum over \(k = 0, \tfrac12\)? — it is not even well formed; Newton's series \((1+t)^{1/2} = \sum_{k\ge 0}\binom{1/2}{k}t^k\) is an infinite series valid only for \(|t| \lt 1\), a different theorem entirely.
Hypothesis.\(x\) and \(y\) commute: \(xy = yx\). Take \(2\times 2\) matrices \(A = \begin{pmatrix}0&1\\0&0\end{pmatrix}\), \(B = \begin{pmatrix}0&0\\1&0\end{pmatrix}\). Then \((A+B)^2 = I\), but \(A^2 + 2AB + B^2 = \begin{pmatrix}2&0\\0&0\end{pmatrix} \neq I\). The correct expansion of \((A+B)^2\) is \(A^2 + AB + BA + B^2\), and the cross terms cannot be merged.
Hypothesis.\(R\) has an identity \(1\) (only needed for \(n = 0\) and for the conventions \(x^0 = y^0 = 1\)). In a non-unital ring \((x+y)^0\) is undefined; the theorem survives for all \(n \ge 1\) provided the boundary terms are read as \(x^n\) and \(y^n\) rather than \(\binom{n}{0}x^n y^0\). Note also that no hypothesis on the characteristic is needed: the coefficient \(\binom{n}{k}\cdot r\) means repeated addition via the canonical \(\mathbb{Z}\)-module structure of \(R\), so the identity is meaningful — and true — even when, say, \(2 = 0\) in \(R\).
Proof
1
Lemma (Pascal's rule). For integers \(1 \le k \le n\): \[ \binom{n}{k-1} + \binom{n}{k} = \binom{n+1}{k}. \]
Direct computation from the factorial definition, putting both fractions over the common denominator \(k!\,(n+1-k)!\): \[ \frac{n!}{(k-1)!\,(n+1-k)!} + \frac{n!}{k!\,(n-k)!} = \frac{n!\,k + n!\,(n+1-k)}{k!\,(n+1-k)!} = \frac{(n+1)!}{k!\,(n+1-k)!}. \] This is the single combinatorial input of the whole proof. B
2
Consequence: every \(\binom{n}{k}\) is a non-negative integer, so the expression \(\binom{n}{k}\,x^{n-k}y^k\) makes sense in any ring via the \(\mathbb{Z}\)-action \(m\cdot r = r + \cdots + r\).
Induction on \(n\) using Step 1: \(\binom{0}{0} = 1 \in \mathbb{Z}\), and Pascal's rule expresses each entry of row \(n+1\) as a sum of two integers from row \(n\) (with \(\binom{n}{k}=0\) for \(k \lt 0\) or \(k \gt n\)). This step is what licenses stating the theorem over an arbitrary ring rather than over \(\mathbb{Q}\)-algebras. C
3
Base case \(n = 0\): \[ (x+y)^0 = 1 = \binom{0}{0}x^0 y^0 = \sum_{k=0}^{0}\binom{0}{k}x^{-k}y^k. \]
Both sides equal \(1\) by the empty-product convention \(r^0 = 1\), which is where the hypothesis that \(R\) is unital is used. A
4
Induction hypothesis. Fix \(n \ge 0\) and assume \[ (x+y)^n = \sum_{k=0}^{n}\binom{n}{k}x^{n-k}y^k. \]
Setting up strong hypotheses is unnecessary; ordinary induction on \(n \in \mathbb{N}\) suffices (Peano induction axiom). A
5
\[ (x+y)^{n+1} = (x+y)\cdot(x+y)^n = x\sum_{k=0}^{n}\binom{n}{k}x^{n-k}y^k \;+\; y\sum_{k=0}^{n}\binom{n}{k}x^{n-k}y^k. \]
Definition of the power \(r^{n+1} = r \cdot r^n\), then left distributivity of multiplication over addition — a ring axiom — applied to the finite sum. A
6
Sub-lemma: since \(xy = yx\), we have \(y\,x^{m} = x^{m}\,y\) for every \(m \ge 0\), hence \[ y \cdot \left(x^{n-k}y^k\right) = x^{n-k}y^{k+1}. \]
Induction on \(m\): the case \(m=0\) is \(y\cdot 1 = 1\cdot y\); and \(y x^{m+1} = (yx)x^{m} = x(yx^{m}) = x(x^{m}y) = x^{m+1}y\), using associativity and the inductive step. This is the exact point where the commutation hypothesis enters — and the only point. C
7
Therefore \[ (x+y)^{n+1} = \sum_{k=0}^{n}\binom{n}{k}x^{n+1-k}y^k \;+\; \sum_{k=0}^{n}\binom{n}{k}x^{n-k}y^{k+1}. \]
First sum: \(x \cdot x^{n-k} = x^{n-k+1}\) (associativity of powers). Second sum: Step 6 moves \(y\) past \(x^{n-k}\) and \(y\cdot y^k = y^{k+1}\). Integer coefficients commute with everything since they act by repeated addition. A
8
Reindex the second sum with \(j = k+1\): \[ \sum_{k=0}^{n}\binom{n}{k}x^{n-k}y^{k+1} = \sum_{j=1}^{n+1}\binom{n}{j-1}x^{n+1-j}y^{j}. \]
Substitution of summation index in a finite sum — a bijection \(\{0,\dots,n\} \to \{1,\dots,n+1\}\), so no terms are gained or lost. B
9
Collect like powers. The term \(j=0\) appears only in the first sum with coefficient \(\binom{n}{0} = 1 = \binom{n+1}{0}\); the term \(j = n+1\) appears only in the second with coefficient \(\binom{n}{n} = 1 = \binom{n+1}{n+1}\); for \(1 \le j \le n\) the coefficient is \[ \binom{n}{j} + \binom{n}{j-1} = \binom{n+1}{j} \] by Step 1. Hence \[ (x+y)^{n+1} = \sum_{j=0}^{n+1}\binom{n+1}{j}x^{n+1-j}y^{j}. \]
Additive regrouping of a finite sum (commutativity and associativity of \(+\) in \(R\)) plus Pascal's rule from Step 1. The boundary terms are handled explicitly, not absorbed by hand-waving. B
10
By the principle of mathematical induction, the identity holds for all \(n \in \mathbb{N}\). \(\blacksquare\)
Steps 3 (base) and 5–9 (inductive step) verify the two premises of the induction axiom for \(\mathbb{N}\). A
Result
\[ xy = yx,\; n \in \mathbb{N} \;\Longrightarrow\; (x+y)^n = \sum_{k=0}^{n}\binom{n}{k}\,x^{n-k}y^{k} \]

Reading. Expanding the product \((x+y)(x+y)\cdots(x+y)\) of \(n\) factors, each monomial arises by choosing \(y\) from some \(k\) of the factors and \(x\) from the other \(n-k\); since \(x\) and \(y\) commute, every such choice contributes the same monomial \(x^{n-k}y^k\), and there are exactly \(\binom{n}{k}\) ways to choose which factors supply the \(y\). The theorem is subset-counting written as algebra.

Scope. Any unital ring (commutative or not), any pair of elements that commute with each other, any integer exponent \(n \ge 0\). It applies to \(\mathbb{R}\), \(\mathbb{C}\), \(\mathbb{Z}/m\mathbb{Z}\), polynomial and power-series rings, and to commuting matrices or operators. It does not apply to non-commuting elements, and it says nothing about non-integer or negative exponents, where the correct statement is Newton's binomial series with a convergence condition.

Corollaries & converses
  • Setting \(x = y = 1\) in \(\mathbb{Z}\): \(\sum_{k=0}^{n}\binom{n}{k} = 2^n\) — a set with \(n\) elements has \(2^n\) subsets.
  • Setting \(x = 1,\ y = -1\), for \(n \ge 1\): \(\sum_{k=0}^{n}(-1)^k\binom{n}{k} = 0\) — a finite nonempty set has as many even-sized subsets as odd-sized ones.
  • The generating function \((1+t)^n = \sum_k \binom{n}{k}t^k\), from which Vandermonde's identity \(\sum_k \binom{m}{k}\binom{n}{r-k} = \binom{m+n}{r}\) follows by comparing coefficients in \((1+t)^m(1+t)^n = (1+t)^{m+n}\).
  • For real \(t \ge 0\): \((1+t)^n \ge 1 + nt\) (Bernoulli's inequality) by discarding the non-negative terms \(k \ge 2\).
  • In a commutative ring of prime characteristic \(p\): \((x+y)^p = x^p + y^p\) (the "freshman's dream" made honest), because \(p \mid \binom{p}{k}\) for \(0 \lt k \lt p\); hence the Frobenius map \(x \mapsto x^p\) is a ring homomorphism.
  • Converse at \(n = 2\): holds. \((x+y)^2 = x^2 + 2xy + y^2\) unpacks to \(x^2 + xy + yx + y^2 = x^2 + xy + xy + y^2\), which after cancellation (additive group!) is exactly \(yx = xy\). So the quadratic case is equivalent to commutation.
  • Converse at a single \(n \ge 3\): fails. In \(R = k\langle a,b\rangle / (\text{all monomials of degree } \ge 3)\), the elements \(a, b\) satisfy \((a+b)^3 = 0 = a^3 + 3a^2b + 3ab^2 + b^3\) (every degree-3 product vanishes), yet \(ab \neq ba\) since the degree-2 monomials \(ab\) and \(ba\) are distinct basis elements of the quotient.
Fails without
  • Drop commutativity. With the matrices \(A = \begin{pmatrix}0&1\\0&0\end{pmatrix}\), \(B = \begin{pmatrix}0&0\\1&0\end{pmatrix}\): \(AB = \begin{pmatrix}1&0\\0&0\end{pmatrix}\), \(BA = \begin{pmatrix}0&0\\0&1\end{pmatrix}\), so \((A+B)^2 = AB + BA = I\) (as \(A^2 = B^2 = 0\)), while the binomial formula predicts \(A^2 + 2AB + B^2 = \begin{pmatrix}2&0\\0&0\end{pmatrix}\). The formula is off by \(AB - BA \neq 0\). This is why \(e^{A+B} = e^A e^B\) fails for non-commuting matrices: the exponential series is built from binomial expansions.
  • Drop \(n \in \mathbb{N}\). For \(n = -1\), the finite sum \(\sum_{k=0}^{-1}\) is empty, yet \((1+t)^{-1} = 1 - t + t^2 - t^3 + \cdots\) is an infinite geometric series, convergent only for \(|t| \lt 1\); at \(t = 2\) the series diverges even though \((1+2)^{-1} = \tfrac13\) exists. No finite binomial-type identity can produce it.
  • Keep the shape but drop the coefficients. In \(\mathbb{Z}\), \((1+1)^3 = 8 \neq 2 = 1^3 + 1^3\): the "freshman's dream" \((x+y)^n = x^n + y^n\) fails already for the smallest inputs. It becomes true only in characteristic \(p\) with \(n = p^m\), for the coefficient-divisibility reason above — the exception that proves the coefficients are doing real work.
Common errors
  • The freshman's dream. Writing \((x+y)^n = x^n + y^n\). False over \(\mathbb{R}\), \(\mathbb{Z}\), \(\mathbb{Q}[t]\) for every \(n \ge 2\) (test \(x = y = 1\)); true only in characteristic \(p\) for \(p\)-power exponents.
  • Off-by-one in "the \(k\)-th term". The term containing \(y^k\) is \(\binom{n}{k}x^{n-k}y^k\), which is the \((k+1)\)-st term when counting from 1. Asked for "the 4th term of \((x+2)^7\)", the answer uses \(k = 3\), not \(k = 4\).
  • Dropping the inner coefficient. The coefficient of \(x^3\) in \((2x-3)^5\) is not \(\binom{5}{2}\); the factor \((2x)^3\) contributes \(2^3\) and \((-3)^2\) contributes \(9\). Always expand the whole term \(\binom{n}{k}(ax)^{n-k}b^k\) before reading off coefficients.
  • Sign slips in \((x-y)^n\). Substituting \(-y\) gives alternating signs \((-1)^k\binom{n}{k}x^{n-k}y^k\); a frequent error is to alternate starting from the wrong end, or not at all. Sanity check: the last term of \((x-y)^3\) is \(-y^3\).
  • Applying the theorem to operators that do not commute — e.g. expanding \((\frac{d}{dt} + t)^2\) acting on functions as \(\frac{d^2}{dt^2} + 2t\frac{d}{dt} + t^2\), which is wrong because \(\frac{d}{dt}\circ t = t\frac{d}{dt} + 1\); the correct square has an extra \(+1\).
  • Confusing the theorem with Newton's series. Using a finite expansion for \((1+x)^{1/2}\) or treating the infinite series as valid for all \(x\); the series requires \(|x| \lt 1\) (or delicate endpoint analysis).
Discussion

The result has one of the longest recorded histories in mathematics. The case \(n = 2\) appears geometrically in Euclid's Elements (Book II, Prop. 4). The coefficient triangle was known to Pingala's commentators in India (the meru-prastāra, by the 10th century building on much older prosody), to al-Karajī in Baghdad around 1000 CE — whose argument, transmitted by al-Samaw'al, is essentially the Pascal-rule induction given above — and to Jia Xian and Yang Hui in Song-dynasty China. Pascal's Traité du triangle arithmétique (1654) systematised the triangle and, notably, contains one of the earliest fully explicit uses of mathematical induction. Newton's 1665 leap was to guess the pattern for fractional exponents, creating the binomial series — an analytic statement whose rigorous justification had to wait for Cauchy and Abel in the 19th century.

Structurally, the theorem is the statement that \((1+t)^n\) is the generating function of the sequence \(\binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n}\). This single fact powers a large fraction of enumerative combinatorics: identities like Vandermonde's or \(\sum_k \binom{n}{k}^2 = \binom{2n}{n}\) drop out of comparing coefficients in products of binomials, with no summation gymnastics. In probability it gives the binomial distribution its name and its normalisation \(\sum_k \binom{n}{k}p^k(1-p)^{n-k} = (p + (1-p))^n = 1\). Its immediate generalisation, the multinomial theorem \((x_1 + \cdots + x_m)^n = \sum \frac{n!}{k_1!\cdots k_m!}x_1^{k_1}\cdots x_m^{k_m}\), follows by induction on \(m\) using the binomial case.

In prime characteristic the theorem becomes a structural tool rather than a formula. Since \(k!\,(p-k)!\,\binom{p}{k} = p!\) and \(p\) is prime, Euclid's lemma forces \(p \mid \binom{p}{k}\) for \(0 \lt k \lt p\), so in any commutative \(\mathbb{F}_p\)-algebra the Frobenius \(F(x) = x^p\) is a ring endomorphism. This one consequence underlies Fermat's little theorem, the Frobenius elements that generate Galois groups of finite fields, Lucas' congruence \(\binom{n}{k} \equiv \prod_i \binom{n_i}{k_i} \pmod p\) (proved by expanding \((1+t)^n = \prod_i \big((1+t)^{p^i}\big)^{n_i} = \prod_i (1+t^{p^i})^{n_i}\) over \(\mathbb{F}_p\)), and — much further afield — the divided-power structures \(\gamma_k(x) = x^k/k!\) of crystalline cohomology, which axiomatise "\(x^k/k!\)" in settings where dividing by \(k!\) is not legal. Rings in which all the operations \(x \mapsto \binom{x}{n}\) are defined ("binomial rings", Hall 1969) form a genuine algebraic theory of their own.

Common misconceptions. The theorem does not require the whole ring to be commutative — only the two elements being added must commute (Step 6 is the only place commutation is used). It involves no limits, no convergence, and no division: every coefficient is an integer acting by repeated addition, which is why it holds verbatim in \(\mathbb{Z}/m\mathbb{Z}\). Finally, "the binomial theorem for \(n = -1\) or \(n = \frac12\)" is a misnomer: those are statements about convergent infinite series over \(\mathbb{R}\) or \(\mathbb{C}\), logically downstream of this theorem but not instances of it.

Worked examples

Example 1. Find the coefficient of \(x^3\) in \((2x - 3)^5\).

1
Apply the theorem with the commuting pair \(u = 2x\), \(v = -3\) in \(\mathbb{R}[x]\), \(n = 5\): \[ (2x-3)^5 = \sum_{k=0}^{5}\binom{5}{k}(2x)^{5-k}(-3)^{k}. \]
\(\mathbb{R}[x]\) is a commutative unital ring, so the hypotheses hold for any two of its elements. A
2
The general term is \(\binom{5}{k}\,2^{5-k}(-3)^{k}\,x^{5-k}\); the power of \(x\) is \(3\) exactly when \(5 - k = 3\), i.e. \(k = 2\).
\((2x)^{5-k} = 2^{5-k}x^{5-k}\) since scalars commute with \(x\); matching exponents in a polynomial identity is legal because \(\{1, x, x^2, \dots\}\) is a basis of \(\mathbb{R}[x]\). B
3
\[ \binom{5}{2}\,2^{3}\,(-3)^{2} = 10 \cdot 8 \cdot 9 = 720. \]
Arithmetic: \(\binom{5}{2} = \frac{5!}{2!\,3!} = 10\). A
\[ [x^3]\,(2x-3)^5 = 720 \]

Reading. The theorem reduces a fifth-power expansion to a single three-factor product; no multiplication of polynomials was ever performed.

Scope. The same one-line method finds any coefficient of any \((ax+b)^n\).

Example 2. Show that for every \(n \ge 1\), a set \(S\) with \(n\) elements has exactly \(2^{n-1}\) subsets of even size and \(2^{n-1}\) of odd size.

1
Let \(E\) and \(O\) denote the number of even-sized and odd-sized subsets of \(S\). Since a subset of size \(k\) can be chosen in \(\binom{n}{k}\) ways: \[ E + O = \sum_{k=0}^{n}\binom{n}{k}, \qquad E - O = \sum_{k=0}^{n}(-1)^k\binom{n}{k}. \]
Splitting the full sum by parity of \(k\); the sign \((-1)^k\) is \(+1\) on even \(k\) and \(-1\) on odd \(k\). B
2
Apply the binomial theorem in \(\mathbb{Z}\) twice: with \(x = y = 1\), \[ E + O = (1+1)^n = 2^n; \] with \(x = 1,\ y = -1\) and \(n \ge 1\), \[ E - O = (1 + (-1))^n = 0^n = 0. \]
\(\mathbb{Z}\) is a commutative unital ring; \(0^n = 0\) requires \(n \ge 1\), which is exactly the hypothesis of the claim (for \(n = 0\), the empty set has one even subset and no odd ones). B
3
Solving the linear system: \(E = O = 2^{n-1}\).
Add and subtract the two equations and divide by \(2\) — legal in \(\mathbb{Z}\) since \(E + O = 2^n\) is even. A
\[ E = O = 2^{n-1} \quad (n \ge 1) \]

Reading. Evaluating one algebraic identity at two points settled a counting question with no bijection in sight (though one exists: toggle a fixed element).

Scope. Any finite nonempty set; the argument fails for \(n = 0\) precisely where \(0^n = 0\) fails.

Problems
  1. Expand \((x+2)^4\) completely.
    Solution By the theorem with \(y = 2\), \(n = 4\): \[ (x+2)^4 = \sum_{k=0}^{4}\binom{4}{k}x^{4-k}2^k = x^4 + 4\cdot 2\,x^3 + 6\cdot 4\,x^2 + 4\cdot 8\,x + 16, \] using \(\binom{4}{0},\dots,\binom{4}{4} = 1,4,6,4,1\). Hence \[ (x+2)^4 = x^4 + 8x^3 + 24x^2 + 32x + 16. \] Check: at \(x = 1\) both sides give \(81 = 3^4\).
  2. Find the coefficient of \(x^7\) in \((3x - 2)^{10}\).
    Solution The general term is \(\binom{10}{k}(3x)^{10-k}(-2)^k = \binom{10}{k}3^{10-k}(-2)^k x^{10-k}\). We need \(10 - k = 7\), so \(k = 3\): \[ \binom{10}{3}\,3^{7}\,(-2)^{3} = 120 \cdot 2187 \cdot (-8) = -2\,099\,520. \] So \([x^7](3x-2)^{10} = -2099520\).
  3. Find the term independent of \(x\) in \(\left(x^2 + \dfrac{1}{x}\right)^{9}\) (for \(x \neq 0\)).
    Solution The general term is \[ \binom{9}{k}(x^2)^{9-k}\left(x^{-1}\right)^k = \binom{9}{k}x^{18 - 2k - k} = \binom{9}{k}x^{18-3k}. \] (The theorem applies in the commutative ring \(\mathbb{R}[x, x^{-1}]\) of Laurent polynomials.) The exponent vanishes when \(18 - 3k = 0\), i.e. \(k = 6\), giving \[ \binom{9}{6} = \binom{9}{3} = 84. \] The constant term is \(84\).
  4. Prove that \(\displaystyle\sum_{k=0}^{n}\binom{n}{k}^2 = \binom{2n}{n}\).
    Solution Work in \(\mathbb{Z}[t]\) and expand both sides of \((1+t)^n(1+t)^n = (1+t)^{2n}\) by the binomial theorem. The coefficient of \(t^n\) on the right is \(\binom{2n}{n}\). On the left, multiplying the two expansions, the coefficient of \(t^n\) is \[ \sum_{k=0}^{n}\binom{n}{k}\binom{n}{n-k} \] (the term \(t^k\) from the first factor pairs with \(t^{n-k}\) from the second). By the symmetry \(\binom{n}{n-k} = \binom{n}{k}\) — immediate from the factorial formula — this equals \(\sum_k \binom{n}{k}^2\). Since \(\{1, t, t^2, \dots\}\) is a \(\mathbb{Z}\)-basis of \(\mathbb{Z}[t]\), equal polynomials have equal coefficients, and the identity follows.
  5. Let \(p\) be prime. (a) Show \(p \mid \binom{p}{k}\) for \(0 \lt k \lt p\). (b) Deduce that \((a+b)^p \equiv a^p + b^p \pmod{p}\) for all \(a, b \in \mathbb{Z}\). (c) Deduce Fermat's little theorem: \(a^p \equiv a \pmod p\) for all \(a \in \mathbb{Z}\).
    Solution (a) From the factorial definition, \(k!\,(p-k)!\,\binom{p}{k} = p!\), and \(p \mid p!\). For \(0 \lt k \lt p\), every factor of \(k!\) and of \((p-k)!\) is a positive integer strictly less than \(p\), so \(p\) divides none of them; since \(p\) is prime, Euclid's lemma gives \(p \nmid k!\,(p-k)!\). As \(p\) divides the product \(k!\,(p-k)!\,\binom{p}{k}\) but not the first two factors, Euclid's lemma again forces \(p \mid \binom{p}{k}\). (b) By the binomial theorem in \(\mathbb{Z}\), \[ (a+b)^p = a^p + b^p + \sum_{k=1}^{p-1}\binom{p}{k}a^{p-k}b^k, \] and by (a) every term of the middle sum is divisible by \(p\); reduce mod \(p\). (c) Induction on \(a \ge 0\): the case \(a = 0\) is trivial, and by (b) with \(b = 1\), \[ (a+1)^p \equiv a^p + 1^p \equiv a + 1 \pmod p \] using the inductive hypothesis \(a^p \equiv a\). For negative \(a\), write \(a \equiv r \pmod p\) with \(0 \le r \lt p\) and note \(a^p \equiv r^p \equiv r \equiv a\). (For odd \(p\) one can instead use \((-a)^p = -a^p\); the case \(p = 2\) is checked directly since \(a^2 \equiv a \pmod 2\) for both parities.)