[proofplan]
We prove both directions. The reverse direction ($\Leftarrow$) builds compactness in three stages: a bisection argument shows $[a,b]$ is compact, [Tychonoff for finite products](/theorems/314) gives compactness of $[-M, M]^n$, and the [closed-subset-of-compact theorem](/theorems/307) gives compactness of $K$. The forward direction ($\Rightarrow$) uses that compact subsets of Hausdorff spaces are closed and that a finite subcover from the ball cover $\{B(0, m)\}$ gives boundedness.
[/proofplan]
[step:Prove $[a, b]$ is compact by the bisection argument]
Suppose for contradiction that $\{U_i\}_{i \in I}$ is an open cover of $[a, b]$ with no finite subcover. Bisect $[a, b]$ into $[a, (a+b)/2]$ and $[(a+b)/2, b]$. At least one half has no finite subcover; call it $[a_1, b_1]$. Iterate to obtain a nested [sequence](/page/Sequence) $[a_n, b_n]$ with $b_n - a_n = (b-a)/2^n$ and each $[a_n, b_n]$ having no finite subcover.
By the nested intervals theorem (the sequences $(a_n)$ increasing and bounded above, $(b_n)$ decreasing and bounded below, with $b_n - a_n \to 0$), $\bigcap_{n=0}^{\infty} [a_n, b_n] = \{c\}$ for some $c \in [a, b]$. Choose $U_j$ from the cover with $c \in U_j$. Since $U_j$ is open, $(c - \varepsilon, c + \varepsilon) \subseteq U_j$ for some $\varepsilon > 0$. For $n$ large enough that $(b-a)/2^n < \varepsilon$, we have $[a_n, b_n] \subseteq (c - \varepsilon, c + \varepsilon) \subseteq U_j$, so $\{U_j\}$ is a finite subcover of $[a_n, b_n]$ --- contradicting the choice of $[a_n, b_n]$.
[/step]
[step:Deduce $[-M, M]^n$ is compact via Tychonoff for finite products]
By the previous step, each factor $[-M, M]$ is compact. By [Tychonoff's theorem for finite products](/theorems/314), the product of two compact spaces is compact. Applying inductively $n - 1$ times: $[-M, M]^n$ is compact.
[/step]
[step:Show closed and bounded $K$ is compact as a closed subset of a compact box]
Since $K$ is bounded, $K \subseteq [-M, M]^n$ for some $M > 0$. Since $K$ is closed in $\mathbb{R}^n$, it is closed in the subspace $[-M, M]^n$. By [compact subspaces and Hausdorff spaces](/theorems/307) (part 1), closed subsets of compact spaces are compact. Therefore $K$ is compact.
[/step]
[step:Show compact implies closed using the Hausdorff property]
$\mathbb{R}^n$ is Hausdorff (it is metrisable). By [compact subspaces and Hausdorff spaces](/theorems/307) (part 2), compact subsets of Hausdorff spaces are closed. Therefore $K$ is closed.
[/step]
[step:Show compact implies bounded via a finite subcover of the ball cover]
The collection $\{B(0, m)\}_{m \in \mathbb{N}}$ is an open cover of $K$. By compactness, finitely many suffice: $K \subseteq B(0, m_1) \cup \cdots \cup B(0, m_k) = B(0, M)$ where $M = \max(m_1, \ldots, m_k)$. Therefore $K$ is bounded.
[/step]