[proofplan]
We show that spheres of different dimensions are distinguished by their homology groups, which are homotopy invariants. By the [Homology of $S^n$](/theorems/2242), $H_{n-1}(S^{n-1}) \cong \mathbb{Z}$. If $n \neq m$, then $H_{n-1}(S^{m-1})$ is either $0$ (when $m - 1 \neq n - 1$ and $n - 1 \neq 0$) or differs from $\mathbb{Z}$ in a way that prevents a homotopy equivalence. Since [homotopy equivalences induce isomorphisms on homology](/theorems/2237), the existence of a homotopy equivalence $S^{n-1} \simeq S^{m-1}$ would force all homology groups to agree, yielding a contradiction.
[/proofplan]
[step:Recall the homology groups of spheres and the homotopy invariance of homology]
By the [Homology of $S^n$](/theorems/2242), for any $d \geq 1$:
\begin{align*}
H_k(S^d) = \begin{cases} \mathbb{Z} & k = 0 \text{ or } k = d \\ 0 & \text{otherwise.} \end{cases}
\end{align*}
By [Homotopy Equivalences Induce Isomorphisms](/theorems/2237), if $S^{n-1} \simeq S^{m-1}$, then $H_k(S^{n-1}) \cong H_k(S^{m-1})$ for all $k$.
[/step]
[step:Show $S^{n-1} \not\simeq S^{m-1}$ by exhibiting a homology group that distinguishes them]
Assume $n \neq m$ and, without loss of generality, $n > m$. We consider two cases.
**Case 1: $m \geq 2$.** Then $n - 1 \geq 2$ and $m - 1 \geq 1$ with $n - 1 \neq m - 1$. Consider the group $H_{n-1}$:
\begin{align*}
H_{n-1}(S^{n-1}) &\cong \mathbb{Z}, \\
H_{n-1}(S^{m-1}) &= 0,
\end{align*}
where the second equality holds because $n - 1 \neq 0$ (since $n \geq 3$) and $n - 1 \neq m - 1$ (since $n \neq m$), so $H_{n-1}(S^{m-1}) = 0$ by the homology computation. Since $\mathbb{Z} \not\cong 0$, we have $H_{n-1}(S^{n-1}) \not\cong H_{n-1}(S^{m-1})$, so no homotopy equivalence $S^{n-1} \simeq S^{m-1}$ can exist.
**Case 2: $m = 1$.** Then $S^{m-1} = S^0$, which consists of two points and is not path-connected. Since $n > 1$, the sphere $S^{n-1}$ is path-connected. We have $H_0(S^{n-1}) \cong \mathbb{Z}$ (one path component) and $H_0(S^0) \cong \mathbb{Z}^2$ (two path components). Since $\mathbb{Z} \not\cong \mathbb{Z}^2$, the groups $H_0(S^{n-1})$ and $H_0(S^0)$ are not isomorphic, so $S^{n-1} \not\simeq S^0$.
In both cases, $S^{n-1} \not\simeq S^{m-1}$.
[guided]
The strategy is to find a single degree $k$ where the homology groups of $S^{n-1}$ and $S^{m-1}$ differ. The natural choice is $k = n - 1$: we know $H_{n-1}(S^{n-1}) \cong \mathbb{Z}$, and if $n - 1 \neq m - 1$ (and $n - 1 \neq 0$), then $H_{n-1}(S^{m-1}) = 0$.
The case $m = 1$ (i.e., $S^{m-1} = S^0$) requires separate treatment because $S^0$ is not connected and the formula from the [Homology of $S^n$](/theorems/2242) applies only for $d \geq 1$. For $S^0$, the zeroth homology $H_0(S^0) \cong \mathbb{Z}^2$ (one copy of $\mathbb{Z}$ per path component) distinguishes it from any connected sphere $S^{n-1}$ with $n \geq 2$, which has $H_0(S^{n-1}) \cong \mathbb{Z}$.
Why is homology the right tool? Homotopy equivalences preserve all algebraic-topological invariants, including homology groups. To show two spaces are *not* homotopy equivalent, it suffices to find any invariant that differs. Homology groups are computable and distinguish spheres of different dimensions, making them the ideal choice.
[/guided]
[/step]