あいだ (間) means the space between a start and an end. A あいだ、B says that B continues from the start to the end of period A. Because A is a period with some length, the verb before あいだ is usually in the ている form, and B is something that lasts, not a single quick event. The subjects of A and B can be different.
§1Structure
Verb ている form / dictionary form of state verbs such as いる + あいだ、 い-adjective + あいだ、 な-adjective + な + あいだ、 noun + の + あいだ. The main clause describes an action or state that continues through the whole period (often 〜ている / 〜ていた, or with ずっと).
§2Examples
子どもが寝ているあいだ、わたしは本を読んでいました。
こどもがねているあいだ、わたしはほんをよんでいました。
While my child was sleeping, I was reading a book the whole time.
夏休みのあいだ、ずっと国に帰っていました。
なつやすみのあいだ、ずっとくににかえっていました。
I was back in my home country for the whole summer vacation.
日本にいるあいだ、ずっとこのアパートに住むつもりです。
にほんにいるあいだ、ずっとこのアパートにすむつもりです。
I plan to live in this apartment for as long as I am in Japan.
雨が降っているあいだ、喫茶店で待っていた。
あめがふっているあいだ、きっさてんでまっていた。
While it was raining, I waited in a coffee shop.
母が留守のあいだ、だれが犬の世話をしますか。
ははがるすのあいだ、だれがいぬのせわをしますか。
Who will take care of the dog while my mother is away?
外が明るいあいだ、子どもたちは公園で遊んでいた。
そとがあかるいあいだ、こどもたちはこうえんであそんでいた。
While it was light outside, the children were playing in the park.
祖父は元気なあいだ、毎日畑で働いていました。
そふはげんきなあいだ、まいにちはたけではたらいていました。
While my grandfather was in good health, he worked in the fields every day.
会議のあいだ、だれも何も言いませんでした。
かいぎのあいだ、だれもなにもいいませんでした。
During the meeting, nobody said anything.
§3Common mistakes
- Using あいだ when the main clause is a single event that happens at one moment. 留守のあいだ、どろぼうが入りました is wrong, because a thief breaking in does not continue through the whole period. For an event at some point inside the period, use あいだに: 留守のあいだに、どろぼうが入りました.
- Using the た-form of an action verb before あいだ because the sentence is about the past. 子どもが寝たあいだ is wrong. Keep the ている form and put the past tense at the end of the sentence: 子どもが寝ているあいだ、テレビを見ていました.
- Forgetting の after a noun or な after a な-adjective: 旅行あいだ should be 旅行のあいだ, and 暇あいだ should be 暇なあいだ.
§4How it's different from similar grammar
- あいだに (at some point within a period)
- With あいだ, the main action fills the whole period: 母が買い物をしているあいだ、車の中で待っていました (I waited in the car the whole time). With あいだに, the main action happens once and is finished somewhere inside the period: 母が買い物をしているあいだに、電話を一本かけました (I made one phone call at some point during that time).
- ながら (one person doing two things at once)
- ながら joins two actions done by the same person at the same time, and it attaches to the ます-stem: 音楽を聞きながら、宿題をします. あいだ marks a period, and the two clauses can have different subjects: 弟が音楽を聞いているあいだ、わたしは宿題をしていました. You cannot use ながら when the subjects are different.
§5How this shows up on the JLPT
The most common N4 question is the choice between あいだ and あいだに. Read the main clause: if it has ずっと or a continuing form like 〜ていました, choose あいだ; if it is a one-time, completed action, choose あいだに. Questions also test what comes before あいだ (ている, noun + の, な-adjective + な). In sentence-ordering questions, the block 'noun + の + あいだ' or '〜ている + あいだ' usually comes before the comma.
§6Quick check (3 questions)
1. Choose the word that fits the blank: 電車に乗っている__、ずっと音楽を聞いていました。
でんしゃにのっている__、ずっとおんがくをきいていました。
2. Which sentence is grammatically correct?
3. What does this sentence tell us? 母が料理を作っているあいだ、わたしはテレビを見ていました。
ははがりょうりをつくっているあいだ、わたしはテレビをみていました。