A compact Hausdorff space is metrizable if it is locally metrizable 
A space $X$ is locally metrizable if each point $x$ of $X$ has a neighborhood that is metrizable in the subspace topology. Show that a compact Hausdorff space $X$ is metrizable if it is locally metrizable.
Hint: Show that $X$ is a finite union of open subspaces, each of which has a countable basis.

I tried to use the fact of compact space. But I do not know if the opens are compact subspaces.

For every $x\in X$, there exists a neighborhood $U_x$ which is metrizable. These neighborhoods cover $X$, i.e., $X=\bigcup_x U_x$. Now use the definition of compactness to reduce this to a finite union, $X=U_1\cup\ldots\cup U_n$. Each of these sets is metrizable, so pick metrics which are defined locally on each $U_i$. Lastly, use a partition of unity to patch together the local metrics into a global one.
