まま・ ままにstill that way; as it is
Something stays the way it is, where you would expect a change: the window still open, your shoes still on, a town just as it used to be.
while doing something else
I accidentally fell asleep with the window open.
it hasn't changed
This town is still just as it was long ago.
With a verb
Verb in the た-form or the ない-form + まま
開けたまま, 食べないまま. Not the dictionary form, even for the present or the future; that turns up mostly in set phrases.
With other words
Noun + のまま ・ な-adjective + なまま ・ い-adjective + まま
制服のまま, 静かなまま, 冷たいまま. Also このまま, そのまま, あのまま.
Still that way while you do something
The first part is a state, not something you are busy doing: glasses on, uniform on, breakfast uneaten. It would normally have changed before the second part happened, which is why てしまった so often follows.
I accidentally fell asleep with my glasses on.
I went to the convenience store still wearing my school uniform.
I went to school without eating breakfast.
Don't eat standing up. Sit down.
Why the た-form?
It isn't past tense here. You put the shoes on first, and what stays is the result. So the た-form is used for rules and for tomorrow too, where English has no tense at all: "with your shoes on".
Please don't come in with your shoes on.
Not said: 靴を
(Please don't come in with your shoes on.)
たまま or て?
The て-form only says how you are while you do something. たまま adds that you would normally have changed it first.
I went into the classroom wearing a hat.
What you had on.
I went into the classroom with my hat still on.
You were expected to take it off, and didn't.
Nothing has changed: ままだ
Even after an hour, the juice was still cold.
The light is still on, you know.
The town stayed quiet.
Leaving it that way: ままにする
English "leave" is ままにする. With ておく added, you are leaving it that way on purpose.
Please don't leave the window open.
I kept my phone turned off during the meeting.
Words you'll use every day
そのままas it is
I don't need a bag. It's fine as it is.
On the phone, そのままお待ちください is "please hold".
このままlike this, as things are
Keep going straight on.
Close neighbours
ながらN5
Two things you are busy doing at once. Listening to music is something you do, not a state you stay in.
I do my homework while listening to music.
っぱなしN3
Casual, and usually a complaint: it should have been shut or switched off. It goes on the ます-stem, not the た-form.
Don't leave the window open.
ままに・がままにN2
The set phrases with a dictionary form before まま. They mean "wherever the wish or the wind takes you".
I wandered through an unfamiliar town wherever my fancy took me.
Check yourself
1"I fell asleep with the TV on."
テレビを
Choose an answer to see why.
2Which sentence sounds natural?
Choose an answer to see why.
More detail
まま or ままで
Before the second action you can add で, and nothing changes: 開けたまま寝た, 開けたままで寝た.
ままになっている
Something was left that way and nobody has dealt with it.
The moving boxes are still sitting there untouched.
More sentences
The furniture is still arranged as it was on the day of the move.
Please leave that as it is.
I ate breakfast still in my pajamas.