|How the sausage is made|
A "gerrymander" is a voting district in first past the post electoral systems which is geographically nonsensical, created to tweak the representation of various groups in a legislative body. It is named for then-governor of Massachusetts Elbridge Gerry and the salamander, and was coined for a state senate district which crawled all the way around the port city of Boston from the shore to the south to the shore to the north, and was illustrated in a political cartoon of the day as an actual salamander. There are two common ways of gerrymandering districts. One is "packing", where as many voters as possible from an opposing party are shoved into a single district, resulting in a district that is safe for that party but limiting their opportunities to gain more seats. One example of packing is Louisiana's 2022 congressional map, where the Democrat-voting cities of New Orleans and Baton Rouge are shoved into the same district so that Republicans can easily win the rest of the districts. The other main method is "cracking", or splitting an area that votes for the opposing party into multiple districts in order to dilute their voting power; one such example is Utah's 2022 congressional map, which splits the Salt Lake City metro area into four separate districts, making it so that the Democratic Party voters in the metro area are overwhelmed by the Republicans in the rural areas.
Around the world
The biggest and most overlooked factor that has increased partisanship is gerrymandering. From 1982 to 2020, the Republican National Committee was banned from posting "agents, servants, and employees" at polling sites for fucking with voters based upon their race. It targeted a lot of black and Latino voters and had them removed from the voter rolls, despite their being eligible to vote. Typically, the more people who vote, the better the Democrats do in elections.
In the United States, each state is required to reapportion their Congressional districts following each decennial census. The party in power in each state tries its best to increase its representation by this method, even to the level of using computer programs to parse the exact boundaries of the districts. In the 2000 census, it was discovered that the dominant party of a state could completely control the districts using computerized gerrymandering. This means that politicians are more beholden to the far left and far right, because the middle has been carved out and given to the other side, or simply marginalized. Some states, however, have mandated letting a computer program do the job "honestly", taking the politics out of the task. Also California now does its redistricting via an independent commission composed of 5 Democrats, 5 Republicans, and 4 Other (minor party, independents, etc.). Some computer programs exist that allow anyone, whether they are a politician or not, to experiment with drawing lines and viewing data for districts they have drawn.
State legislatures tend to approve district boundaries that benefit incumbents, sticking their opponents into safe seats and cramming all of their supporters into a small number of districts. This allows the incumbent to spread their supporters over a larger number of districts. Sometimes a majority party punishes the minority party by redistricting two minority incumbents into the same district, forcing them to run against each other in a primary. Another strategy is to stuff as many minority party voters as possible into the fewest possible districts. The US House of Representatives formed from the 2012 US House Elections reflected pro-GOP gerrymandering by state legislatures, as it had a Republican majority despite the fact that Democratic candidates got more votes overall.
Historically, gerrymandering was used in the US to limit African American representation. More recently, African American advocacy groups supported gerrymandering as a means to increase black representation, but the US Supreme Court ruled in Shaw v. Reno that district lines could not be drawn on the basis of race. Because "pandering" to white males is seen as the default, it's only considered "pandering" if you're going out of your way to appease a different group.
In the 2020s, gerrymandering hit extreme levels, as states proposed gerrymanders more egregious than ever before. For example, Illinois gerrymandered their map from 13-5 to 14-3,, and Ohio, which made their previous 12-4 map into 13-2. North Carolina also made their maps 10-4, at least, in favor of Republicans. However, both states had their maps shot down in courts, forcing to redraw them to be more favorable (in this case, no more than 8-6 for North Carolina at least.) Texas also did racial gerrymandering, and is also getting sued over it. Not saying every state gerrymandered, but most of them did.
Gerrymandering was also commonplace in Northern Ireland prior to the abolition of the old Stormont Parliament in 1972, with the intention of restricting Roman Catholic representation. This in addition to Sinn Fein abstentionism made the Parliament a practically all Protestant-Unionist body and many Catholics actually welcomed "direct rule" from London at first.
It is claimed that the current constituency boundaries of the United Kingdom Parliament favour the Labour Party, which was able to win a majority in 2005 with a lower share of the vote than the Conservative Party had when they fell short in 2010.
Gerrymandering was common in the early days. When the provinces of Alberta and Saskatchewan were created in 1905, the boundaries of their provincial electoral districts were defined by the federal Liberals to benefit their provincial cousins. This became much less of a problem after responsibility for drawing district boundaries (both federal and provincial) was handed over to independent agencies, first in Manitoba in 1950 and then federally in 1964.
It was only in the 1980s that the control of political boundaries in Ireland was finally removed from the hands of sitting government ministers. Ireland gave us the term Tullymandering in the 1970s when minister James Tully did his utmost to fiddle electoral boundaries to ensure the return of the ruling Fine Gael/Labour coalition. He failed miserably and the opposition won a landslide victory in 1977, hence the birth of the term Tullymandering to describe the phenomenon of a failed attempt at gerrymandering .
Since independence in 1957, Malaysia has been ruled by the Barisan National coalition and gerrymandering has been a consistent feature of their rule. In the 2013 election, Barisan Nasional won 60% of the seats in the Malaysian Parliament despite only receiving 47% of the popular vote.
In Singapore, critics have long accused the ruling PAP elite of gerrymandering to maintain a significant parliamentary majority. The Elections Department fixes electoral boundaries and is part of the executive branch which reports to the (always PAP) Prime Minister. This has raised its ugly head yet again in advance of the Parliamentary elections expected in late 2015. 
Have a look at the popular vote and the seat allocation in this election. Bear in mind that it was the last election before Apartheid as we now know it was implemented. While the now-ruling African National Congress is far from perfect, it at least wins the elections it runs in.
Measures against it
Apart from alternative voting systems like single transferable vote, which help reduce some of the effects of gerrymandering, especially when more than two parties have non-negligible shares of the vote, the easiest way to make gerrymandering harder is having bigger districts with more members. If California has fifty districts, it is easier to finagle them in a way to produce any desired majority or even a House seat for the Green party. If there are five seats with ten representatives each (pretty much no matter how they are chosen) it is much harder to suppress minority or even majority opinions in the state. Ultimately bigger and bigger districts become indistinguishable from proportional representation which entirely avoids Gerrymandering by design, but has its own problems, including a disconnect between voter and representative as representatives are not based on the local area of a district and in most proportional representation systems it is difficult or impossible to vote a specific person in or out, as the vote is mostly for a list of several persons. There are systems that remedy those problems by giving one or several votes to chose specific persons with (including the possibility to vote for people from different parties on the same ballot), but those systems have their own problems the biggest of them being overly complex. In some countries there is a combination of proportional representation and district based voting either in two different chambers (e.g. district based upper house proportional lower house) or in the same chamber, but the latter can create distortions up to and including "negative weight" for votes, where a party can lose seats if it gains votes. In general it can be said that more complex voting systems have fewer problems (besides their complexity) but no ideal voting system exists, especially if there are more than two relevant parties.
- What Redistricting Looks Like In Every State, FiveThirtyEight
- America’s most gerrymandered congressional districts, Washington Post
- Shaw v. Reno on Oyez.org
- Soffen, Kim, "How racial gerrymandering deprives black people of political power", WaPo 6.9.16. Pandering to white males is called "campaigning"!
- Ross, Janell, "The Trump campaign’s problematic definition of ‘pandering’", WaPo 5.27.16.
- Democrats add one more House seat in Illinois from redistricting, playing catch up with GOP, CBS News, November 24, 2021
- Ohio Governor Signs Congressional Map With 13-2 Republican Edge, Bloomberg Government, November 22, 2021
- North Carolina’s extreme new gerrymander, explained, Vox, November 9, 2021
- Column: Texas gerrymandering is all about keeping a grip on white power, Los Angeles Times, December 8, 2021
- Constituencies of Ireland, 1977 - 1981
- What’s Malay for gerrymandering?
- 10 things I learnt about the politics of gerrymandering in S’pore from reading The Straits Times