[proofplan]
We prove the maximum modulus principle by contradiction. If $|g|$ attains a maximum at an interior point $z_0$, the mean value property of analytic functions forces $|g|$ to be constantly equal to $|g(z_0)|$ on a disk around $z_0$. But a non-constant analytic function with constant modulus on an open set must be constant, yielding a contradiction.
[/proofplan]
[step:Assume $|g|$ attains a maximum at $z_0 \in \Omega$ and derive constancy on a disk]
Suppose $|g|$ attains a maximum at $z_0 \in \Omega$.
If $g(z_0) = 0$, then $|g(z)| \leq 0$ on a disk, so $g \equiv 0$ there.
Otherwise, let $M = |g(z_0)| > 0$.
By the mean value property of analytic functions, for any $0 < \rho < r$ with $D(z_0, r) \subset \Omega$:
\begin{align*}
M = |g(z_0)| &\leq \frac{1}{2\pi}\int_0^{2\pi} |g(z_0 + \rho e^{i\theta})|\,d\mathcal{L}^1(\theta) \leq M.
\end{align*}
Equality throughout forces $|g(z_0 + \rho e^{i\theta})| = M$ for all $\theta$ (since a continuous function $\leq M$ whose average equals $M$ must equal $M$ everywhere).
This holds for all $0 < \rho < r$, so $|g|$ is constant on $D(z_0, r)$.
[/step]
[step:Conclude that constancy of $|g|$ on an open set forces $g$ to be constant]
A non-constant analytic function with constant modulus on an open disk would satisfy $g\bar{g} = M^2$.
By the [open mapping theorem](/theorems/631) (or the Cauchy-Riemann equations), this forces $g$ to be constant, contradicting the hypothesis.
Therefore $|g|$ cannot attain a maximum in $\Omega$.
[/step]