Hausdorff Space is Hereditarily Compact iff Finite

Theorem
Let $(X,\tau)$ be a Hausdorff space.

Then $(X,\tau)$ is hereditarily compact iff $X$ is finite and $\tau$ is the discrete topology.

Proof
Necessary condition

Suppose that $(X,\tau)$ is hereditarily compact.

Let $Y\subset X$ with $Y\neq X$ be a subspace of $(X,\tau)$.

Then it is compact by hypothesis.

Since $(X,\tau)$ is Hausdorff, we find that $Y$ is closed in $(X,\tau)$.

Thus for all $Y\subset X$, we find that $Y$ is closed in $X$, thus $\tau$ is discrete.

Since $X\subset X$ is a subspace of $(X,\tau)$, we find that $(X,\tau)$ is compact.

Suppose $|X|=\infty$, then $(\{x\})_{x\in X}$ is an open cover for $X$ that has no finite subcover.

Thus $|X|<\infty$.

Sufficient condition

Let $X$ be finite with the discrete topology.

Since $X$ is finite, every open cover for $X$ is already finite, thus has a finite subcover.

Since $X$ is finite, $Y\subset X$ is also finite, and every open cover for $Y$ is also finite. Thus every open cover for $Y$ has a finite subcover.

Thus $(X,\tau)$ is hereditarily compact.