Topological Spaces, Continuous Maps, and Compactness
Topological spaces
A topology on a set $X$ is a collection $\tau$ of subsets of $X$ containing $\varnothing$ and $X$, closed under arbitrary unions and finite intersections. The sets in $\tau$ are called open.
A map $f\colon X \to Y$ between topological spaces is continuous if $f^{-1}(U)$ is open in $X$ for every open set $U \subseteq Y$.
If $f\colon X\to Y$ and $g\colon Y\to Z$ are continuous, then so is $g\circ f$.
For $U \subseteq Z$ open, $(g\circ f)^{-1}(U) = f^{-1}\big(g^{-1}(U)\big)$. By Definition 1.2, $g^{-1}(U)$ is open in $Y$, and hence $f^{-1}(g^{-1}(U))$ is open in $X$.
Compactness
A space $X$ is compact if every open cover of $X$ has a finite subcover.
If $f\colon X \to Y$ is continuous and $X$ is compact, then $f(X)$ is compact.
Compactness is a topological property: by Theorem 2.2, it is preserved by homeomorphisms.