I get mixed up over the variants of prepositions so I’m going to lay them out in a tabular format and see if that helps
Trás | Baixo | Cima | Frente | |
* | Preposition: after | Adjective: low, short | Not really used on its own | Noun: front |
A- | Atrás de = behind | Abaixo: below, underneath | Acima: above | Afrente: não existe |
A[ ] | A trás: não existe | A baixo: não existe | A cima: não existe | A frente: at the head of (and à frente: onward, ahead (of)) |
De | Detrás: behind (specifically right behind) | Debaixo: under, underneath | Decima: não existe | Defrente: não existe |
De[ ] | De trás: from the back (movement) | De baixo: from below | De cima: Upper, from high up | De frente: head on |
Por | Por trás: behind – at some place behind (less specific than “detrás”) | Por baixo: below | Por cima: On top, above, overhead | Por frente: from the front |
Para | Para trás: to the back | Para baixo: down, downward | Para cima: Up, upwards | Para frente: forwards |
Por de… | Por detrás: behind | Por debaixo: beneath | Por decima: não existe | Por defrente: não existe |
Em | Em trás: não existe | em baixo: down below (used a lot on youtube when inviting comments!) | Em cima: On, above, up there | Em frente: in front of (opposite – as opposed to ) |
And also… | Anos atrás = years ago | Abaixo also used for “down with…” as in “Abaixo o governo!” | Ainda por cima = And on top of that (something else bad happened!) | Daqui para a frente= henceforth |
And also… | De baixo can also mean bottom – “a gaveta de baixo”=bottom drawer | De trás para a frente: backwards |
Sources:
Ciberdúvicas [por detrás] [Atrás] [a frente vs em frente]