[proofplan]
We pull back the diagonal class $\delta \in H^d(M \times M; \mathbb{Q})$ along the diagonal map $\Delta: M \to M \times M$, evaluate on the fundamental class $[M]$, and compute both sides: the pullback of each Künneth summand $a_i \otimes b_i$ reduces to $a_i \smile b_i$ on $M$, and the evaluation on $[M]$ gives the dual basis pairing $\langle a_i, b_i \rangle = \delta_{ii} = 1$, so the result is the alternating sum of the dimensions of $H^k(M; \mathbb{Q})$.
[/proofplan]
[step:Pull back the diagonal class along $\Delta$]
Let $\Delta: M \to M \times M$ denote the diagonal map $x \mapsto (x, x)$, and let $\pi_1, \pi_2: M \times M \to M$ be the two projections. For any class $\alpha \otimes \beta \in H^*(M; \mathbb{Q}) \otimes H^*(M; \mathbb{Q}) \cong H^*(M \times M; \mathbb{Q})$, we have $\alpha \otimes \beta = \pi_1^*\alpha \smile \pi_2^*\beta$, so
\begin{align*}
\Delta^*(\alpha \otimes \beta) = \Delta^*(\pi_1^*\alpha \smile \pi_2^*\beta) = (\pi_1 \circ \Delta)^*\alpha \smile (\pi_2 \circ \Delta)^*\beta = \alpha \smile \beta,
\end{align*}
since $\pi_i \circ \Delta = \operatorname{id}_M$ for $i = 1, 2$. Applying this to the [Diagonal Class](/theorems/2296) $\delta = \sum_i (-1)^{|a_i|} a_i \otimes b_i$:
\begin{align*}
\Delta^*(\delta) = \sum_i (-1)^{|a_i|} \Delta^*(a_i \otimes b_i) = \sum_i (-1)^{|a_i|} (a_i \smile b_i).
\end{align*}
[/step]
[step:Evaluate on $[M]$ using the dual basis property]
The dual basis satisfies $\langle a_i, b_j \rangle = (a_i \smile b_j)[M] = \delta_{ij}$ by definition. Evaluating $\Delta^*(\delta)$ on the fundamental class $[M] \in H_d(M; \mathbb{Q})$:
\begin{align*}
\Delta^*(\delta)[M] = \sum_i (-1)^{|a_i|} (a_i \smile b_i)[M] = \sum_i (-1)^{|a_i|} \cdot 1 = \sum_i (-1)^{|a_i|}.
\end{align*}
[/step]
[step:Identify the sum with the Euler characteristic]
The basis $\{a_i\}$ is a homogeneous basis for $H^*(M; \mathbb{Q}) = \bigoplus_{k=0}^d H^k(M; \mathbb{Q})$. For each degree $k$, the number of basis elements $a_i$ with $|a_i| = k$ equals $\dim_\mathbb{Q} H^k(M; \mathbb{Q})$. Therefore
\begin{align*}
\sum_i (-1)^{|a_i|} = \sum_{k=0}^d (-1)^k \dim_\mathbb{Q} H^k(M; \mathbb{Q}) = \chi(M),
\end{align*}
where the last equality is the [Euler Characteristic Equals Homological Euler Characteristic](/theorems/2266) computed over $\mathbb{Q}$. Combining with the previous step:
\begin{align*}
\Delta^*(\delta)[M] = \chi(M).
\end{align*}
[/step]