Image copyright PA

Each Wednesday at noon, MPs gather in the House of Commons for Prime Minister's Questions, and Labour Leader Jeremy Corbyn gets six attempts to question Theresa May.

It's billed as a fiery debate about the issues of the week, but it can often head off-topic into what might sound like an unscripted generalised ramble.

There's a very good reason for why this happens - as well as engaging with their opponent, both leaders are also trying to go viral on social media.

At last week's Prime Minister's Questions - or PMQs as it is widely known - Mr Corbyn's first couple of questions were about the big issue of the week - the prime minister's failure to a secure a Brexit deal in Brussels on Monday.

But his final "question" wasn't really a question at all, it was more of a general rant about how bad the Conservatives are.

"Whether it is Brexit, the National Health Service, social care, our rip-off railways, rising child poverty, growing pensioner poverty or universal credit, this government is unable to solve important issues facing this country," he said.

All are criticisms you might expect a Labour leader to make but it's hardly topical. Why not drill down on the issue of the week, and force a response to an awkward question?

Mr Corbyn finished by saying: "If they cannot negotiate a good deal, would it not be better if they just got out of the way?"

You could be forgiven for thinking that's not really a question. It almost looks like Mr Corbyn isn't speaking to Theresa May and other MPs.

That's because in a sense, he's not.

A couple of hours later after Prime Minister's Questions finished, a video appeared on the Labour leader's Facebook feed showing this exact segment, cut down to a 41-second clip, with "Tories' shambolic Brexit negotiations" written at the top.

Mr Corbyn's broad-brush criticisms of the government might seem odd, given the week's events, and the question-and-answer format.

But clipped up and pumped into people's Facebook feeds, it's an eye-catching piece of political communication.

It makes complete sense lifted from the context of PMQs, and is timeless - people can share it in a week, or a month, and it will still make sense.

So how did Mrs May respond to Mr Corbyn's "question"?

Well, she went on a scripted rant of her own, accusing Labour of misleading students on writing off tuition fee debt.

She even brought along a leaflet from the election campaign to prove her point - so this was clearly pre-prepared.

Why would she go completely off-topic, rather than defending her government's record against Mr Corbyn's criticisms?

For exactly the same reason as Mr Corbyn.

A couple of hours after the exchange, Mrs May's accusation appeared on her Facebook page.

Just like the example from the Labour leader, the PM's clip makes complete sense when removed from the context of the overall exchange and isn't time sensitive.

The SNP's leader in the House of Commons Ian Blackford also puts PMQs clips on Facebook, but in his case it's normally the full video of his two questions - and commendably fairly - the PM's answers.

They also tend to lack the subtitles which are always on May and Corbyn's clips - subtitles are seen to be important because a lot of social media users view videos without sound.

The Conservatives successfully targeted voters using Facebook in the 2015 election campaign, helping them to an unexpected victory. But this year Labour are widely seen to have done better online, contributing to their surprisingly strong showing.

Both Mr Corbyn and Mrs May's videos from Wednesday have tens of thousands of views, doubtless reaching many people who didn't watch the full exchange, and probably many more who are unaware of when it happened.

They're short, snappy, visually arresting, not time-sensitive and have a clear title which tells you what the video will be about.

The question which seems rambling and off-topic to avid Westminster-watchers keeping a close eye on Prime Minister's Questions is a regular feature now of Jeremy Corbyn's appearances, getting hundreds and thousands of views on Facebook (rather than Twitter, which has a far smaller reach but is used by virtually all political journalists and MPs).

Theresa May does it less often, and when she does, she tends to get fewer views.

Research has found that those who used the internet to get news about the 2017 general election were far more likely to have voted Labour. So it makes sense that Labour's videos tend to get more views.

Mrs May has managed to score a couple of viral successes though by using the same format as her political opponent - making a strongly-worded, broad argument, which isn't topical that week, and won't go out of date quickly.

Of course, this sort of media strategy isn't an entirely new concept. Politicians have long been aware of the fact that only short segments of their parliamentary speeches make it into TV news bulletins.

But May and Corbyn's styles of viral PMQs rants are different to TV "soundbites", which tend to be short, and focused on a topical event.

So next time you watch Prime Minister's Questions and think the leaders seem to be both scripted and off-topic, that Mr Corbyn is not asking a question and Mrs May is not answering one, you are probably right.

But there's a very good reason for it. They are speaking to people who aren't in the room.