〜ように
So that… (purpose, with non-volitional verbs)machine translation
FormationVerb dictionary form / ない-form (non-volitional verbs, potential form) + ように
ように expresses purpose just like ために, but it specializes in outcomes you can't directly control: before ように comes a non-volitional verb (分かる、聞こえる、なる、治る…), a potential form (読める、話せる), or a ない-form. You perform the action in the second clause and hope the state in the first clause comes true on its own: 早く治るように、薬を飲んでいます.
The rule for choosing between the two patterns is compact: if the first clause is something you can actively do → ために (働くために); if it's a state that happens on its own or a ない-form → ように (忘れないように、聞こえるように). Saying ×忘れないために is wrong because "not forgetting" isn't a deliberate action. In addition, ように allows the two clauses to have different subjects: 子供にも分かるように、ゆっくり話します.
Don't confuse it with 〜のように (the simile "like…") — that pattern follows a noun + の, while purpose ように always follows a verb. This pattern also gives rise to two other important N4 structures: ようになる (change in ability or habit) and ようにする (sustained effort) — coming up in the next two lessons.
Examples
忘れないように、ノートに書いておきます。
I write it down in my notebook so that I don't forget.
後ろの人にも聞こえるように、大きい声で話しました。
I spoke in a loud voice so that the people in the back could hear too.
早く病気が治るように、薬を飲んでいます。
I'm taking medicine so that I get over my illness quickly.