Following the 2020 United States Census, congressional representation will be re-apportioned among the states. Then congressional districts within each state must be re- drawn. Gerrymandering is the process of manipulating district boundaries to favor a particular outcome of an election. In order to prevent gerrymandering, most states require that electoral districts are compact. However, compactness is rarely defined. We will discuss different strategies used to gerrymander. Then we will examine how mathematics can be used to measure compactness and detect gerrymandering.