[step:Set up the global $L^2$ inner product and the orthogonality of $\mathcal{H}^p$ with $\Delta\Omega^p(M)$]
Let $(M, g)$ be a compact oriented Riemannian manifold, $\omega_g$ its Riemannian volume form, $(\cdot, \cdot)_g$ the fibrewise inner product on $\Lambda^p T^*M$, and
\begin{align*}
\langle\langle \cdot, \cdot \rangle\rangle_g : \Omega^p(M) \times \Omega^p(M) &\to \mathbb{R}, \\
(\eta, \xi) &\mapsto \int_M (\eta, \xi)_g \, \omega_g
\end{align*}
the global $L^2$ inner product. Since $M$ is compact and the integrand is continuous, this pairing is finite on all of $\Omega^p(M) \times \Omega^p(M)$. The associated norm is $\|\eta\|_g := \langle\langle \eta, \eta \rangle\rangle_g^{1/2}$, and the space of harmonic $p$-forms is
\begin{align*}
\mathcal{H}^p := \{\alpha \in \Omega^p(M) : \Delta\alpha = 0\}.
\end{align*}
We first verify orthogonality: for any $\alpha \in \mathcal{H}^p$ and any $\beta \in \Omega^p(M)$,
\begin{align*}
\langle\langle \alpha, \Delta\beta \rangle\rangle_g \overset{(*)}{=} \langle\langle \Delta\alpha, \beta \rangle\rangle_g = \langle\langle 0, \beta \rangle\rangle_g = 0,
\end{align*}
where $(*)$ uses the [Laplacian is Formally Self-Adjoint](/theorems/2743) identity, whose hypotheses (compactness of $M$, smooth forms) are satisfied. So $\mathcal{H}^p \subseteq (\Delta\Omega^p(M))^\perp$ in the $L^2$ pairing on $\Omega^p(M)$.
Conversely, if $\alpha \in (\Delta\Omega^p(M))^\perp$, then for every $\beta \in \Omega^p(M)$,
\begin{align*}
0 = \langle\langle \alpha, \Delta\beta \rangle\rangle_g = \langle\langle \Delta\alpha, \beta \rangle\rangle_g.
\end{align*}
Specialising to $\beta := \Delta\alpha$ gives $\|\Delta\alpha\|_g^2 = 0$, hence $\Delta\alpha = 0$ by positive-definiteness of $\|\cdot\|_g$ on smooth forms over a compact manifold. So
\begin{align*}
\mathcal{H}^p = (\Delta\Omega^p(M))^\perp,
\tag{O}
\end{align*}
where the orthogonal complement is taken inside $\Omega^p(M)$ with respect to $\langle\langle \cdot, \cdot \rangle\rangle_g$.
[/step]