In general we simplify the definition to be: A compact set is a set which is closed (that is it contains its boundary points) and is bounded.

Example [2,8] is a compact set. The unit disk including the boundary is a compact set. (3,5] is not a compact set. Note that all of these examples are of sets that are uncountably infinite.

A set E is compact if and only if, for every family latex2($\left{G_{\alpha}\right}_{\alpha \in A}$) of open sets such that latex2($E \subset \cup_{\alpha \in A}G_{\alpha}$)

Introduction to Analysis 5th edition by Edward D. Gaughan