Why 'deshalb' and 'trotzdem' put the verb before the subject
Many German words that link two ideas look like English conjunctions: deshalb means 'so' or 'that's why', trotzdem means 'anyway' or 'nevertheless', sonst means 'otherwise'. Grammatically, though, they are adverbs. When you put one at the start of a clause, it fills the first slot of the sentence, so the conjugated verb must come next and the subject moves behind it.
English speakers tend to keep their usual subject-verb order and say deshalb ich bleibe, because 'so I stay' sounds perfectly normal in English. In German that order is wrong. The words below all work the same way, whether they express a reason, a contrast, an addition, a sequence in time or a condition.
Word list
allerdingsA2howeverAllerdings ist es teuer = However, it's expensiveals ErstesA2firstAls Erstes machen wir Kaffee = First of all we'll make coffeeanschließendA2afterwardsAnschließend gehen wir essen = Afterwards we're going for a mealdamalsA2thenDamals wohnte ich in Rom = At that time I lived in RomedanachA2afterwardsDanach gehen wir essen = Afterwards we're going for a mealendlichA2finallyEndlich ist er da = Finally he's herejedochA2howeverJedoch hat er gewonnen = However, he wonnachherA2afterwardsNachher gehen wir essen = Afterwards we're going for a mealschließlichA2finallySchließlich hat er ja gesagt = Finally he said yesspäterA2afterwardsSpäter gehen wir essen = Later we're going for a mealtrotzdemA2howeverTrotzdem hat er gewonnen = He won anywayzu der ZeitA2thenZu der Zeit wohnte ich in Rom = Back then I lived in Romezu dieser ZeitA2thenZu dieser Zeit wohnte ich in Rom = At that time I lived in RomealsoB1soAlso gehen wir = So we're goingam AnfangB1at firstAm Anfang war es schwer = At the beginning it was hardandererseitsB1on the other handAndererseits ist es gesund = On the other hand, it's healthyanfangsB1at firstAnfangs war es schwer = At first it was hardansonstenB1otherwiseAnsonsten verpassen wir den Zug = Otherwise we'll miss the trainaußerdemB1besidesAußerdem regnet es = Besides, it's rainingauf der anderen SeiteB1on the other handAuf der anderen Seite ist es gesund = On the other hand, it's healthydagegenB1on the other handDagegen ist es teuer = On the other hand, it's expensivedaherB1soDaher ist das wichtig = That's why this is importantdarüber hinausB1besidesDarüber hinaus ist es billig = Furthermore, it's cheapdarumB1soDarum frage ich = That's why I'm askingdeshalbB1soDeshalb komme ich nicht = That's why I'm not comingdeswegenB1soDeswegen komme ich nicht = That's why I'm not comingerstB1at firstErst essen wir, dann gehen wir = First we eat, then we gofrüherB1previouslyFrüher wohnte ich in Berlin = I used to live in BerlinhingegenB1on the other handHingegen ist es teuer = On the other hand, it's expensiveim AnschlussB1afterwardsIm Anschluss gehen wir essen = Afterwards we're going for a mealin der ZwischenzeitB1meanwhileIn der Zwischenzeit koche ich = In the meantime I'm cookinginzwischenB1meanwhileInzwischen wohnt sie in Wien = By now she lives in ViennamittlerweileB1meanwhileMittlerweile wohnt sie in Wien = By now she lives in ViennaseitdemB1ever sinceSeitdem wohnt sie hier = Since then she has lived hereseitherB1ever sinceSeither wohnt sie hier = Since then she has lived heresonstB1otherwiseSonst verpassen wir den Zug = Otherwise we'll miss the trainstattdessenB1instead ofStattdessen trinke ich Tee = I drink tea insteadüberdiesB1besidesÜberdies ist es billig = Furthermore, it's cheapübrigensB1by the wayÜbrigens habe ich Zeit = By the way, I have timevorerstB1for the time beingVorerst bleibe ich hier = For now I'm staying herevorherB1previouslyVorher rufe ich dich an = I'll call you before thatvorläufigB1for the time beingVorläufig bleibe ich hier = For the time being I'm staying herewährenddessenB1meanwhileWährenddessen koche ich = Meanwhile I'm cookingzu diesem ZeitpunktB1thenZu diesem Zeitpunkt war ich krank = At that point I was illzudemB1besidesZudem ist es billig = Furthermore, it's cheapzuerstB1at firstZuerst essen wir = First we'll eatzunächstB1at firstZunächst war es schwer = At first it was hardzuvorB1previouslyZuvor rufe ich dich an = I'll call you before thatandernfallsB2otherwiseAndernfalls verpassen wir den Zug = Otherwise we'll miss the trainanfänglichB2at firstAnfänglich war es schwer = Initially it was hardunterdessenB2meanwhileUnterdessen koche ich = Meanwhile I'm cookingzu jener ZeitB2at that timeZu jener Zeit wohnte ich in Rom = Back then I lived in Rome
How it works
A German main clause keeps its conjugated verb in second position. The first position can hold the subject, a time phrase, an object or one of these connector adverbs. If the adverb takes position one, the verb takes position two and the subject follows the verb.
Es regnet, deshalb bleiben wir zu Hause.
(It's raining, so we're staying at home.)
In a compound tense, the auxiliary is the verb in second position and the participle goes to the end:
Ich war müde, trotzdem bin ich mitgekommen.
(I was tired; I came along anyway.)
Rule of thumb: adverb, verb, subject. Think of the adverb as taking the subject's seat, which pushes the subject behind the verb.
The words
Reason and consequence
Deshalb, deswegen, darum, daher and also all mean 'so' or 'that's why'. Daher sounds slightly more formal, and also is a false friend: it never means 'also'. Words like folglich behave the same way.
Der Zug fällt aus, also nehmen wir den Bus.
(The train is cancelled, so we're taking the bus.)
Contrast
Trotzdem, allerdings and jedoch introduce a 'however'. Andererseits, hingegen and dagegen mean 'on the other hand', and stattdessen means 'instead'. Dennoch works like trotzdem.
Das Hotel ist schön. Allerdings ist es ziemlich teuer.
(The hotel is nice. However, it's quite expensive.)
Ich trinke keinen Kaffee mehr. Stattdessen trinke ich Tee.
(I don't drink coffee anymore. I drink tea instead.)
Adding something
Außerdem, zudem, darüber hinaus and überdies mean 'besides' or 'furthermore'. The last three are more formal. Übrigens ('by the way') introduces a new point and follows the same order.
Die Wohnung ist hell. Außerdem hat sie einen Balkon.
(The flat is bright. Besides, it has a balcony.)
Time and sequence
Danach, anschließend ('afterwards'), schließlich ('finally') and vorher ('before that') order events, just like dann. Inzwischen, mittlerweile, unterdessen and währenddessen mean 'meanwhile' or 'by now', and seitdem and seither mean 'since then'.
Wir gehen erst ins Museum. Danach gehen wir essen.
(We're going to the museum first. Afterwards we're going for a meal.)
Sie ist vor drei Jahren umgezogen. Seitdem wohnt sie in Wien.
(She moved three years ago. Since then she has lived in Vienna.)
Condition
Sonst, ansonsten and andernfalls mean 'otherwise' or 'or else'.
Beeil dich, sonst verpassen wir den Zug.
(Hurry up, or else we'll miss the train.)
Watch out
Real conjunctions do not take a position in the clause. Und, aber, oder, sondern and denn stand before position one, so normal subject-verb order follows. Denn and deshalb are a classic trap because both deal with reasons:
Ich bleibe zu Hause, denn ich bin müde.
(I'm staying at home because I'm tired.)
Subordinating conjunctions send the verb to the end instead. Compare trotzdem with obwohl:
Ich bin mitgekommen, obwohl ich müde war.
(I came along although I was tired.)
Seitdem can also be used this way: seitdem sie in Wien wohnt means 'since she has lived in Vienna', with the verb at the end.
Because they are adverbs, these words can also appear later in the clause. In that case the subject comes first as usual:
Wir bleiben deshalb zu Hause.
(So we're staying at home.)
Jedoch is especially flexible. It often appears mid-clause (Er hat jedoch gewonnen), and in formal writing it can even act like aber without inversion. If you put it first with inversion, you are always correct.
Summary
When deshalb, trotzdem, sonst, außerdem, danach or any similar connector opens a clause, it fills the first position. The verb comes next and the subject follows: Deshalb komme ich nicht, never Deshalb ich komme nicht. Only true conjunctions such as und, aber, oder and denn leave the normal order unchanged.