What is a "Microcosm"?

What is a "Microcosm"?

Examples:

1. His classroom had people from all over the world in it: it was a microcosm the multi-cultural city that he lived in.

2. The game was in many ways a microcosm his team's season: it was inconsistent, with bursts of brilliance mixed with together in long stretches of boredom.

3. His relationship with her was a microcosm of his life: it had moments of excitement surrounded by long stretches of agony.

What does "microcosm" mean?

It is a small subset of a whole that has the same characteristics of that whole.