집합 X {\displaystyle X} 의 부분집합의 모임 T {\displaystyle {\mathcal {T}}} 이 다음 조건
을 만족하면, T {\displaystyle {\mathcal {T}}} 를 X {\displaystyle X} 의 위상(topology)이라 하고 T {\displaystyle {\mathcal {T}}} 의 원소를 열린집합(open set)이라 한다. ( X , T ) {\displaystyle (X,{\mathcal {T}})} 는 위상공간(topological space), 또는 단순히 공간(space)이라 한다.