If θ∼Beta(α,β) is the prior and, given θ, k successes are observed in n independent trials (so k∣θ∼Binomial(n,θ)), then the posterior is θ∣k∼Beta(α+k,β+n−k).
Why is it true?
The Binomial likelihood contributes a factor θk(1−θ)n−k, and the Beta prior contributes θα−1(1−θ)β−1; multiplying these just adds the exponents, landing exactly on the shape of another Beta density.
Proof sketch
The likelihood of observing k successes in n trials given θ is L(k∣θ)=(kn)θk(1−θ)n−k. By the posterior-proportionality theorem above, π(θ∣k)∝L(k∣θ)π(θ)=(kn)θk(1−θ)n−k⋅B(α,β)θα−1(1−θ)β−1.
The factors (kn) and B(α,β) do not depend on θ, so they can be absorbed into the proportionality: π(θ∣k)∝θk(1−θ)n−k⋅θα−1(1−θ)β−1=θ(α+k)−1(1−θ)(β+n−k)−1.
This last expression is exactly the kernel (the θ-dependent part) of a Beta(α+k,β+n−k) density. Since a probability density on (0,1) with this kernel has a unique normalizing constant (namely 1/B(α+k,β+n−k), by definition of the Beta function), the posterior must be exactly π(θ∣k)=B(α+k,β+n−k)θ(α+k)−1(1−θ)(β+n−k)−1, i.e. θ∣k∼Beta(α+k,β+n−k).