Imperative mood expresses smb's wish, order, request for action.
To form Imperative mood: 1) take the verb in "Я"(I) form, for example Я читаю, Я пишу, Я буду. 2) then take away their endings: чита-ю, пиш-у, буд-у 3) add -Й -И -Ь instead of endings. читай, пиши, будь.
But which letter to choose -Й -И or -Ь? It depends on which letter the verb stem ends. 1) If it ends with vowel or Ь, then add -Й (Example: чита-ю, the verb stem ends with A and this is vowel, so we add -Й, читай)
2) If it ends with consonant, then check where the stress goes a) if stress falls on the ending add -И (Example: пиш-у [pish-ù] we add -И, пиши) b) if the ending is without stress add -Ь (Example: буду, буд-у [bùd-u] we add -Ь, будь)
3) If it ends with CONSONANT+Н add -И (Example: помн-ю, the verb stem ends with МН, so we add -И, помни)
Note: to form imperative for plural add -ТЕ at the end of Imperative for singular. Example: verb идти (to go) - Я иду [id-ù] it ends with consonant Д, we look at where the stress falls [id-ù], the stress falls on the ending, so we add -И. Now we have "иди".
This is imperative mood for singular. Иди туда [idì tudà] - Go there. And to form plural we add to this -ТЕ. Now we have "идите". Идите туда [idìte tudà] - You all go there.