learn german
     Table of Contents Chapter 20 20.1.39 in = in, to, into
  learn languages with music Classic Rocks

Chapter 20: More prepositions

  20.1.39 in = in (with Accusative or with Dative)

in dem is converted into im

Ich bin i
m Garten
and not:
Ich bin
in dem Garten

To this rule there is an exception. If you want to specify the object with a relative clause, then you have to use
in dem.
  Ich bin in dem Garten, der dir so gefällt.
= I am in the garden, that you like so much.
  Note! With verbs of movement in requires the Accusative , in all other cases the Dative. In other words, if the translation into English is to or into, then Accusative is to be used, else Dative.
  Ich gehe in den Garten. = I go into the garden.
Du gehst
in die Schule. = You go to school.
Er fliegt
in die Vereinigten Staaten. = He goes to the US.
Wir fahren
in die Türkei. = We go to Turkey.
  Ich bin im (in dem => im) Garten. = I am in the garden.
Du bist
in der Schule. = You are in school.
Er ist
in den Vereinigten Staaten. = He is in the US.
Wir sind
in der Türkei. = We are in Turkey.