[proofplan]
The proof has two halves. **Necessity:** if $M$ is bounded on $L^p(w)$, testing the operator on the function $f = w^{1-p'} \mathbb{1}_Q$ for an arbitrary cube $Q$ gives the $A_p$ inequality directly. The maximal function controls the average of $f$ on $Q$, which produces the dual factor $\langle w^{1-p'} \rangle_Q^{p-1}$, and the operator-norm bound applied to this test function reproduces the $A_p$ characteristic. **Sufficiency:** assume $w \in A_p$. The proof passes through the weak-type endpoint $L^p(w) \to L^{p,\infty}(w)$ (the analogue of the unweighted weak-(1,1)/strong-$(p,p)$ argument), then upgrades to strong-type by a Marcinkiewicz interpolation. The weak-type bound itself is proved via a covering-lemma argument on the level set $\{Mf > \lambda\}$, applying the [Vitali covering lemma](/theorems/???) and then using the $A_p$ inequality on each selected cube to convert the Lebesgue measure of the level set into its weighted measure.
[/proofplan]
[step:Set notation and reduce to the centered or dyadic maximal function]
For a cube $Q \subset \mathbb{R}^n$, write $|Q| := \mathcal{L}^n(Q)$ and $w(Q) := \int_Q w \, d\mathcal{L}^n$, and $\langle f \rangle_Q := |Q|^{-1} \int_Q f \, d\mathcal{L}^n$. Throughout, "cube" means a cube with sides parallel to the coordinate axes. The (uncentered) maximal function $M$ is comparable to the centered maximal function $M_c$ and to the dyadic maximal function $M^d$ with constants depending only on the dimension $n$, so we may work with whichever variant is most convenient. We use the uncentered $M$ in the necessity direction (where the test cube is exactly the $Q$ we choose) and exploit the dyadic structure in the sufficiency direction.
[/step]
[step:Necessity — derive the $A_p$ inequality by testing $M$ on $w^{1-p'} \mathbb{1}_Q$]
Assume $M: L^p(w) \to L^p(w)$ is bounded with operator norm $\|M\|_{L^p(w) \to L^p(w)} =: A < \infty$.
Fix a cube $Q \subset \mathbb{R}^n$. Define the test function
\begin{align*}
f: \mathbb{R}^n &\to [0, \infty) \\
y &\mapsto w^{1-p'}(y) \, \mathbb{1}_Q(y).
\end{align*}
For every $x \in Q$,
\begin{align*}
M f(x) \ge \frac{1}{|Q|} \int_Q f(y) \, d\mathcal{L}^n(y) = \frac{1}{|Q|} \int_Q w^{1-p'} \, d\mathcal{L}^n = \langle w^{1-p'} \rangle_Q,
\end{align*}
since $Q$ itself is one of the cubes in the supremum defining $M f(x)$.
Therefore
\begin{align*}
\int_Q (M f)^p \, w \, d\mathcal{L}^n \ge \langle w^{1-p'} \rangle_Q^p \, w(Q).
\end{align*}
By the operator-norm bound:
\begin{align*}
\int_Q (M f)^p \, w \, d\mathcal{L}^n \le \int_{\mathbb{R}^n} (M f)^p \, w \, d\mathcal{L}^n \le A^p \int_{\mathbb{R}^n} f^p \, w \, d\mathcal{L}^n = A^p \int_Q w^{p(1-p')} \, w \, d\mathcal{L}^n.
\end{align*}
The exponent simplifies: $p(1-p') + 1 = p - pp' + 1 = p - p \cdot \frac{p}{p-1} + 1$. Using $p p' = p + p'$ (a consequence of $1/p + 1/p' = 1$):
\begin{align*}
p(1-p') + 1 = p - (p + p') + 1 = 1 - p'.
\end{align*}
Hence
\begin{align*}
\int_Q w^{p(1-p') + 1} \, d\mathcal{L}^n = \int_Q w^{1-p'} \, d\mathcal{L}^n = |Q| \langle w^{1-p'} \rangle_Q.
\end{align*}
Combining the two bounds:
\begin{align*}
\langle w^{1-p'} \rangle_Q^p \, w(Q) \le A^p \, |Q| \, \langle w^{1-p'} \rangle_Q.
\end{align*}
If $\langle w^{1-p'} \rangle_Q < \infty$ (which we now verify), divide both sides by $|Q| \langle w^{1-p'} \rangle_Q$ to obtain
\begin{align*}
\langle w \rangle_Q \, \langle w^{1-p'} \rangle_Q^{p-1} \le A^p.
\end{align*}
The finiteness of $\langle w^{1-p'} \rangle_Q$ is a separate point: a priori $w^{1-p'}$ might fail to be locally integrable. To handle this, replace the test function by $f_N := \min(w^{1-p'}, N) \mathbb{1}_Q$ for $N \ge 1$, run the same argument to get
\begin{align*}
\langle w \rangle_Q \, \langle \min(w^{1-p'}, N) \rangle_Q^{p-1} \le A^p,
\end{align*}
and then let $N \to \infty$ via the [Monotone Convergence Theorem](/theorems/???) to deduce both $\langle w^{1-p'} \rangle_Q < \infty$ and the desired inequality.
Taking the supremum over cubes:
\begin{align*}
[w]_{A_p} = \sup_Q \langle w \rangle_Q \langle w^{1-p'} \rangle_Q^{p-1} \le A^p < \infty,
\end{align*}
so $w \in A_p$.
[/step]
[step:Sufficiency — set up the weak-type estimate $M: L^p(w) \to L^{p, \infty}(w)$]
Now assume $w \in A_p$. The objective is to show
\begin{align*}
w(\{Mf > \lambda\}) \le \frac{C_w}{\lambda^p} \int_{\mathbb{R}^n} |f|^p \, w \, d\mathcal{L}^n \qquad \text{for all } \lambda > 0,\; f \in L^p(w),
\end{align*}
with $C_w = C_w(n, p, [w]_{A_p})$. By a standard truncation, we may assume $f \ge 0$ and bounded with compact support — the general case follows by [monotone convergence](/theorems/???).
Fix $\lambda > 0$ and set $\Omega_\lambda := \{x \in \mathbb{R}^n : Mf(x) > \lambda\}$. By the standard structure of the (uncentered) maximal function level set, for every $x \in \Omega_\lambda$ there exists a cube $Q_x \ni x$ with $\langle f \rangle_{Q_x} > \lambda$. Apply the [Vitali covering lemma](/theorems/???) (or equivalently the Besicovitch–type selection for cubes) to extract a countable subfamily $\{Q_j\}_j$ of pairwise disjoint cubes from $\{Q_x\}_{x \in \Omega_\lambda}$ such that
\begin{align*}
\Omega_\lambda \subset \bigcup_j 5 Q_j,
\end{align*}
where $5 Q_j$ denotes the cube concentric with $Q_j$ and side length five times that of $Q_j$. (The factor $5$ is the Vitali constant for cubes; any fixed dimensional constant suffices.)
By construction each $Q_j$ satisfies $\langle f \rangle_{Q_j} > \lambda$, equivalently
\begin{align*}
|Q_j| < \frac{1}{\lambda} \int_{Q_j} f \, d\mathcal{L}^n.
\end{align*}
[/step]
[step:Use Hölder with the dual weight to extract $\int f^p w$ from each cube]
[claim:For each cube $Q$ and non-negative $f$:
\begin{align*}
\left( \frac{1}{|Q|} \int_Q f \, d\mathcal{L}^n \right)^p \le \frac{[w]_{A_p}}{w(Q)} \int_Q f^p \, w \, d\mathcal{L}^n.
\end{align*}]
[proof]
Apply [Hölder's inequality](/theorems/???) with exponents $p$ and $p'$ to the factorisation $f = f w^{1/p} \cdot w^{-1/p}$:
\begin{align*}
\int_Q f \, d\mathcal{L}^n &= \int_Q (f w^{1/p}) \cdot w^{-1/p} \, d\mathcal{L}^n \\
&\le \left( \int_Q f^p w \, d\mathcal{L}^n \right)^{1/p} \left( \int_Q w^{-p'/p} \, d\mathcal{L}^n \right)^{1/p'}.
\end{align*}
Since $-p'/p = -1/(p-1) = 1 - p'$ (using $p'/p = p'/p$ and $p' = p/(p-1)$ giving $p'/p = 1/(p-1)$), the second factor is $\big( \int_Q w^{1-p'} \, d\mathcal{L}^n \big)^{1/p'} = |Q|^{1/p'} \langle w^{1-p'} \rangle_Q^{1/p'}$.
Dividing by $|Q|$ and raising to the $p$-th power:
\begin{align*}
\left( \frac{1}{|Q|} \int_Q f \, d\mathcal{L}^n \right)^p &\le \frac{|Q|^{p/p'}}{|Q|^p} \left( \int_Q f^p w \, d\mathcal{L}^n \right) \langle w^{1-p'} \rangle_Q^{p/p'} \\
&= \frac{1}{|Q|} \left( \int_Q f^p w \, d\mathcal{L}^n \right) \langle w^{1-p'} \rangle_Q^{p-1},
\end{align*}
using $p/p' - p = -1$ (from $1/p + 1/p' = 1$, $p/p' = p - 1$ — actually $p/p' = p(1 - 1/p) = p - 1$) and $p/p' = p - 1$. Multiplying numerator and denominator by $\langle w \rangle_Q = w(Q)/|Q|$ and using the $A_p$ inequality $\langle w \rangle_Q \langle w^{1-p'} \rangle_Q^{p-1} \le [w]_{A_p}$:
\begin{align*}
\left( \frac{1}{|Q|} \int_Q f \, d\mathcal{L}^n \right)^p \le \frac{\langle w \rangle_Q \langle w^{1-p'} \rangle_Q^{p-1}}{w(Q)} \int_Q f^p w \, d\mathcal{L}^n \le \frac{[w]_{A_p}}{w(Q)} \int_Q f^p w \, d\mathcal{L}^n.
\end{align*}
[/proof]
[/claim]
[/step]
[step:Establish doubling for $A_p$ weights]
[claim:If $w \in A_p$ for some $1 \le p < \infty$, then for every cube $Q$ and every $\kappa \ge 1$:
\begin{align*}
w(\kappa Q) \le \kappa^{np} [w]_{A_p} \, w(Q).
\end{align*}]
[proof]
Apply the claim of the previous step with $f = \mathbb{1}_Q$ on the cube $\kappa Q$:
\begin{align*}
\left( \frac{|Q|}{|\kappa Q|} \right)^p = \left( \frac{1}{|\kappa Q|} \int_{\kappa Q} \mathbb{1}_Q \, d\mathcal{L}^n \right)^p \le \frac{[w]_{A_p}}{w(\kappa Q)} \int_{\kappa Q} \mathbb{1}_Q^p w \, d\mathcal{L}^n = \frac{[w]_{A_p} \, w(Q)}{w(\kappa Q)}.
\end{align*}
Since $|\kappa Q|/|Q| = \kappa^n$, rearranging gives $w(\kappa Q) \le \kappa^{np} [w]_{A_p} w(Q)$.
[/proof]
[/claim]
In particular, $w(5 Q) \le 5^{np} [w]_{A_p} \, w(Q)$.
[/step]
[step:Combine the cover, doubling, and $A_p$ trade to get the weak-type bound]
By the Vitali cover, the doubling estimate, and the disjointness of the $Q_j$:
\begin{align*}
w(\Omega_\lambda) \le \sum_j w(5 Q_j) \le 5^{np} [w]_{A_p} \sum_j w(Q_j).
\end{align*}
Now apply the Hölder-with-dual-weight claim to each $Q_j$. Since $\langle f \rangle_{Q_j} > \lambda$ on each selected cube:
\begin{align*}
\lambda^p \, w(Q_j) < \left( \frac{1}{|Q_j|} \int_{Q_j} f \, d\mathcal{L}^n \right)^p w(Q_j) \le [w]_{A_p} \int_{Q_j} f^p \, w \, d\mathcal{L}^n.
\end{align*}
Summing over $j$ (the $Q_j$ are disjoint):
\begin{align*}
\lambda^p \sum_j w(Q_j) \le [w]_{A_p} \sum_j \int_{Q_j} f^p w \, d\mathcal{L}^n \le [w]_{A_p} \int_{\mathbb{R}^n} f^p w \, d\mathcal{L}^n.
\end{align*}
Inserting:
\begin{align*}
w(\Omega_\lambda) \le \frac{5^{np} [w]_{A_p}^2}{\lambda^p} \int_{\mathbb{R}^n} f^p w \, d\mathcal{L}^n.
\end{align*}
This is the weak-type $L^p(w) \to L^{p, \infty}(w)$ bound for $M$ with constant $C_1 := 5^{np} [w]_{A_p}^2$.
[/step]
[step:Upgrade weak-type to strong-type via Marcinkiewicz interpolation through $A_q$]
The bound just proved gives a weak-type $(p, p)$ estimate with respect to the measure $w \, d\mathcal{L}^n$. To obtain the strong-type $(p, p)$ bound, we apply [Marcinkiewicz interpolation](/theorems/???) between two weak-type endpoints. By the [Openness of $A_p$](/theorems/3217), there exists $\varepsilon \in (0, p - 1)$ such that $w \in A_{p - \varepsilon}$, with $[w]_{A_{p-\varepsilon}}$ controlled by $n$, $p$, $[w]_{A_p}$. Applying the previous steps with $p$ replaced by $p - \varepsilon$ gives the weak-type bound
\begin{align*}
w(\{Mf > \lambda\}) \le \frac{C_2}{\lambda^{p - \varepsilon}} \int_{\mathbb{R}^n} |f|^{p - \varepsilon} \, w \, d\mathcal{L}^n
\end{align*}
with $C_2 = 5^{n(p-\varepsilon)} [w]_{A_{p-\varepsilon}}^2$. Together with the elementary $L^\infty(w) \to L^\infty(w)$ bound $\|Mf\|_{L^\infty(w)} \le \|f\|_{L^\infty(w)}$ (which holds because the maximal function pointwise satisfies $Mf \le \|f\|_\infty$), Marcinkiewicz interpolation between weak-$(p-\varepsilon, p-\varepsilon)$ and strong-$(\infty, \infty)$ with respect to the $\sigma$-finite measure $w \, d\mathcal{L}^n$ yields the strong-type $L^q(w) \to L^q(w)$ bound for all $q \in (p - \varepsilon, \infty]$. In particular, $q = p$ is in this range, so
\begin{align*}
\|Mf\|_{L^p(w)} \le C_3 \, \|f\|_{L^p(w)}, \qquad C_3 = C_3(n, p, [w]_{A_p}).
\end{align*}
This completes the sufficiency direction.
[/step]
[step:Conclude the equivalence]
The previous steps establish both directions: $M$ bounded on $L^p(w)$ implies $w \in A_p$ (Step 2), and $w \in A_p$ implies $M$ bounded on $L^p(w)$ (Steps 3–6). Together these prove that for $1 < p < \infty$:
\begin{align*}
M: L^p(w) \to L^p(w) \text{ is bounded} \iff w \in A_p,
\end{align*}
with the operator norm comparable to a power of $[w]_{A_p}$ depending only on $n$ and $p$. This completes the proof of Muckenhoupt's Theorem.
[/step]