Here's a fun little thought experiment demonstrating the fundamental arbitrariness of the electoral college: Had two state borders been drawn just a little bit differently, shifting a total of four counties from one state to another, Hillary Clinton would have won the election.

Take a look at the imaginary map above, which comes from an nifty online tool called Redraw the States. It was created by Kevin Hayes Wilson, a mathematician and data scientist working in computer science education.

This map moves Lake County, Ill. to Wisconsin, turning that state blue. It moves Escambia, Santa Rosa and Okaloosa counties from the Florida panhandle to neighboring Alabama. That's enough to turn Florida blue. With victories in Wisconsin and Florida, Clinton squeaks to victory in the electoral college, 270 to 268.

Exact same votes, slightly different borders, radically different outcome: the capriciousness of the electoral college laid bare.

After the election, a former classmate posed Wilson a question: How stable are the electoral college results under small changes of geography? That is, how much of Donald Trump's electoral college victory is attributable to the odd quirks of geography or history that are baked into our country's state and county borders?

The answer, Wilson found, is “quite a lot.”

To arrive at this answer, Wilson built his interactive border-drawing thought experiment. It allows you to select any number of counties and move them to a different state to see how the electoral results would shake out under those borders.

Recall that the electoral college system is mostly winner-take-all (Maine and Nebraska are the exceptions, assigning most of their electors by congressional district). In Illinois, for instance, it does not matter whether Clinton won by 859,000 votes (her actual margin) or just 5,000 votes — in either scenario, all of the state's electoral votes go to her.

That 859,000-vote margin means Clinton could lose hundreds of thousands of votes and still win Illinois handily. In Lake County, just north of Chicago, Clinton beat Trump by about 70,000 votes. That's greater than Trump's winning margin (about 20,000 votes) in the entire state of Wisconsin.

So, if you let Wisconsin annex Lake County, that state's margin shifts from 20,000 votes in favor of Trump, to 50,000 votes in favor of Clinton. And Clinton still wins Illinois, just by a slightly smaller margin. The net electoral result is that she wins both states.

A similar process is at work in the Florida Panhandle counties. Clinton lost the state by about 120,000 votes. Across the three Panhandle counties of Santa Rosa, Escambia and Okaloosa, Trump's total margin was 126,000 votes.

Moving those three counties to Alabama does not change the outcome there — Trump won the state handily anyway. But it does mean that Clinton wins Florida by about 6,000 votes, enough to shift all of the state's electoral votes into her column.

Because we are indulging in electoral fan fiction here, we could go completely hog-wild and posit that state borders do not even need to be contiguous. If that were the case, you'd need to alter only two counties to give the election to Clinton: you could make Los Angeles County, Calif. (Clinton margin: 1.2 million votes) part of Texas to change the Lone Star State blue.

And you could move, say, Westchester County in New York (Clinton margin: 130,000 votes) to Pennsylvania, putting her over the electoral finish line.

It's also worth nothing that you can futz around with the borders to give Donald Trump an even greater electoral victory than he already has. Put Mohave County, Ariz., in Nevada and Trump wins both states, for example.

Now, nobody's actually proposing we change any borders like this as a matter of policy. And none of this is to suggest that Trump's electoral victory is somehow illegitimate: He won, fair and square, under the rules of the electoral college as set forth in the Constitution. Full stop.

But Wilson's experiment demonstrates the extent to which the principle of “one person, one vote” doesn't really apply to electoral politics. The winner-take-all system means that votes in some states are quite literally more valuable to presidential candidates than votes in other states. This is why the candidates tend to spend all of their time in a small handful of battlegrounds.

The electoral map, in other words, is something of an organic gerrymander — the results it produces owe a lot to the way the boundaries are drawn. The difference between this electoral “gerrymander” and a true gerrymander comes down to intent: the border between Illinois and Wisconsin was not created in 1818 with the intent of electing Donald Trump 200 years later, for instance.

But as Wilson frames it, electoral college results are highly sensitive, or “unstable,” to small shifts in state and county boundaries. Contrast this to an election by national popular vote: In that case, you could move boundaries around all you want without changing the outcome.

For Wilson, that instability is enough to get rid of the electoral college altogether.

“As long as we are directly electing the president,” he wrote for Medium, “let’s finally abolish the Electoral College and use the popular vote, so that moving a few thousand square miles of territory around won’t make the difference between outcomes.”

The process of re-drawing district lines to give an advantage to one party over another is called "gerrymandering". Here's how it works. (Daron Taylor/The Washington Post)

More from Wonkblog:

This is actually what America would look like without gerrymandering

Donald Trump lost most of the American economy in this election

A new theory for why Trump voters are so angry — that actually makes sense