TORONTO – After 40 days of campaigning, the 2019 federal election will come to an end when Canadians head to the polls on Monday.

With results rolling in across the country throughout the evening, CTVNews.ca will be bringing you live updates from the CTV News Decision Desk.

But to get a sense of all the various outcomes that we could see, here’s a scenario-by-scenario guide to what could happen, and what would come next.

If the Liberals win a second majority mandate, securing 170 seats or more, then they will form government. Barring something majorly destabilizing, they would continue to govern for the four years until the next fixed federal election.

Majority governments mean parties have more than half of the seats in the House of Commons so they can pass all major confidence matters, like budget bills, throne speeches, and government legislation, so long as everyone in their caucus votes with the party line.

If the Liberals win a majority expect another cabinet swearing-in ceremony in the months following, to possibly shake up the front bench of ministers with some newly elected faces. They would then return to the House of Commons for the opening of the 43rd Parliament with a Speech from the Throne, laying out what they are committing to do during their mandate. In November 2015 the Liberal cabinet was sworn in, the Throne Speech was in December, and the new session of Parliament began in January.

There is no requirement to immediately return to Ottawa but, depending on the outcome, when you might see MPs back on the Hill could differ. Right now the House of Commons sitting calendar doesn’t have sitting days planned until the New Year.

While looking a lot more likely for the Conservatives than the NDP at this point, the question of what comes next would be the same for either current opposition party if they secure 170 seats or more by the end of election night.

In this case, current prime minister Justin Trudeau would recognize that his government has been defeated, concede and signal to Governor General Julie Payette that he intends to resign. This allows Gov. Gen. Payette to then invite the winning leader, either Conservative Leader Andrew Scheer or NDP Leader Jagmeet Singh, to form government. The leader would be called the prime minister designate and a transition in government would occur to essentially hand over the keys to the castle.

Expect then a swearing-in ceremony, where we’d see whether or not a gender-balanced cabinet is named. Then, same as the Liberals, the next Parliament begins with the nomination of a new Speaker of the House of Commons, with a Speech from the Throne before continuing on with governing for four years.

Based on precedence, the incumbent party is largely seen to have the first right to attempt to continue governing after an election, even if they don’t win the most seats. It’s happened before, Mackenzie King in 1925 is one example.

So, if the margin between the Conservatives and Liberals are close by the end of election night, Trudeau could decide to stay on—he remains the prime minister until he resigns or is dismissed—and test the confidence of the House.

This would mean Trudeau would likely swear-in a cabinet, and reconvene MPs for a new session of Parliament. There, he’d present a Speech from the Throne and this would be the first and key confidence vote he’d need to pass, essentially daring the smaller parties to back him or face a Conservative government or another election.

Now, if the numbers shake out in such a way that the Liberals only need a handful more votes to stay alive, they would be more likely to not enter into any sort of formal agreement and rather look for support on a vote-by-vote basis from the other smaller parties like the NDP or Greens.

If things were shakier and a coalition would offer a more stable path, it’s an option, but still one experts say is very unlikely. (More on coalitions, below.)

If it’s really close and the support they need is the difference of one or two votes and some Independents get elected, that could also be interesting.

Trudeau has so far dodged questions on whether he’d look at teaming up with anyone post-election, saying he is focused on electing a progressive government with a “strong mandate.”

There have been 13 minority governments federally in Canada, three since 2000, and on average they last around two years. Minority governments can be productive, but require more co-operation across party lines.

Scheer has already signalled that he’ll look to form government if his party wins the most seats, but not a majority on election night. His argument is that’s what has been the case “in modern Canadian history.´

While that is true, the most recent example of 2006 where Liberal incumbent Paul Martin resigned in the face of a Conservative minority, his party had lost 32 seats whereas the Conservatives had gained 25 seats from their 2004 election standing.

Given the convention that the sitting prime minister gets the first shot, unless it’s a clear Conservative victory and Trudeau concedes, the Conservatives wouldn’t likely be given the chance to form government until after the Liberals tried and failed.

Should the path be clear for Scheer to form a government, based on current ideological stances, and commitments from his party and others: it might not last long.

Scheer has flatly rejected the idea of forming a coalition, or working with any other party. His promise to make his first bill one to axe the carbon tax isn’t likely to get support from the progressive parties so it’s almost certain his only chance to actually follow through on that would have to be in a majority scenario.

If the Conservatives only need a few more votes to maintain the confidence of the House, they could sprinkle some targeted measures into their Throne Speech in hopes that, say perhaps an Independent, or member of another smaller party, could be persuaded. Special focus on Quebec perhaps?

But if it’s super close, say the Conservatives and Liberals both win around 130 seats, then it would be much harder for the Conservatives to push ahead given the NDP have routinely stated they will not support a Conservative government, and the Liberals have spent the last 40 or so days talking about how bad a Conservative government would be for Canada.

Now, it is possible that Trudeau lets Scheer try to form government, knowing it would be a precarious endeavor if the seat counts are close, and wait in the wings with Singh and others to potentially swoop in after the Conservatives lose a vote and make the case to let the other parties try.

First: there has been no polling to suggest this is a realistic possibility, but in elections anything can happen and Singh’s party certainly has been picking up steam. so we will have to wait and see.

Singh is the only leader that has been talking about a coalition, saying it is not a dirty word, so it is possible he would try to take that rather unprecedented route if he was in the position of forming a minority government, looking for alliances with the Liberals and Greens, who are ideologically the most aligned on progressive issues.

Coalition governments are when parties join forces to hold a larger share of seats than any other party. This can include formal agreements where the cabinet includes members from both, or all parties depending on how many team up.

They could also be more informal pacts, like a “confidence and supply” agreement where they have worked out how many years the smaller members of the coalition are willing to prop up the governing party, under conditions that certain policies are enacted. This is what is currently happening in British Columbia.

There has only been one federal coalition government, in 1917, and it didn’t last long. A coalition was attempted, unsuccessfully, just weeks after the 2008 election by the Liberals, Bloc, and NDP, and was largely seen as a power-grab.

In either coalition or in a minority the smaller parties have the power to push for demands and must-haves, as Singh has. He has already spelled out the conditions for his party's support in a minority Parliament. They include implementing national pharmacare and dental care, as well as electoral reform. That means these issues could be back on the table as must-dos for support.

Green Party Leader Elizabeth May has previously said her support in a minority scenario is contingent on the party presenting a serious climate plan, something she's said none have done to date. May has also said she would rather defeat a government and ultimately force Canadians back to the polls rather than allow a party with a climate plan not up to her standards to govern.

Bloc Quebecois Leader Yves-Francois Blanchet has said he isn't interested in teaming up with anyone in a coalition, but would decide on a case-by-case basis whether to support various initiatives proposed by either a Conservative or Liberal minority.

If at any point in any scenario a government loses a confidence vote, they’re done.

The prime minister would request parliament be dissolved and then the Governor General has the discretion whether to agree to that, and call another election, or allow another party in the House to attempt to form a government that would have the confidence of the House.

Depending on how far along a government is, this decision could differ. Weeks or months after the last election and things fall apart, the latter option is more likely than throwing the country into another campaign.

There is also the possibility, as is common after elections, that parties could be looking to change up who leads them after an election if things don’t go as well as planned for them. So keep your minds open to the possibility that any post-election dynamics and negotiations could also be happening with new or outgoing faces around the table, or amid leadership contests.