ように details
write + so that
kaku you ni
so that; in order that; (indirect command) to do
meaning: so that you write
電車に間に合うように、早めに出てください。
densha ni maniau you ni hayame ni dete kudasai.
Please leave early so that you make it in time for the train. neutral
先生は生徒たちに、明日は九時までに来るように言った。
sensei wa seitotachi ni, ashita wa kuji made ni kuru you ni itta.
The teacher told the students to come by nine tomorrow. neutral
Examples
so that / in order that — a non-volitional, potential, or negative goal that a following deliberate action secures
電車に間に合うように、早めに出てください。
densha ni maniauyouni hayame ni dete kudasai.
Please leave early so that you make it in time for the train. neutral
分かるように、簡単な言葉で説明したよ。
wakaruyouni, kantan na kotoba de setsumei shita yo.
I explained it in simple words so that you understand. casual
大事な用件を忘れないように、メモしておいた。
daiji na youken o wasurenai you ni, memo shite oita.
I jotted it down so I wouldn't forget the important matter. neutral
誰でも安全に使えるように、取扱説明書を作成いたしました。
dare demo anzen ni tsukaeru you ni, toriatsukai setsumeisho o sakusei itashimashita.
We prepared the instruction manual so that anyone could use it safely. formal
indirect command — reports a request or instruction after 言う/頼む/伝える, softer than a quoted direct order
先生は生徒たちに、明日は九時までに来るように言った。
sensei wa seitotachi ni, ashita wa kuji made ni kuru you ni itta.
The teacher told the students to come by nine tomorrow. neutral
母に、野菜も食べるようにってよく言われる。
haha ni, yasai mo taberu you ni tte yoku iwareru.
My mom's always telling me to eat my vegetables too. casual
Formation
{V}ようにattaches to dictionary form{V-nai}ようにattaches to ない-form
Notes
ように (前に言ったように "as I said before") is always the resemblance よう, but
non-past can be that よう too (思うように "as I'd like") — the disambiguator is the
clause relation to what follows, not tense alone.
Related patterns
Similar
ように is the default for outcomes the subject cannot will directly — potentials, states, and most negatives (間[ま]に合[あ]うように急[いそ]ぐ, 忘[わす]れないように書[か]く); negative ために is still productive where the avoided outcome IS controllable (失敗[しっぱい]しないために練習[れんしゅう]する — failing is something effort can prevent). ように is also required whenever the goal-clause's agent differs from the main clause's subject (子供[こども]が食[た]べるように、細[こま]かく刻[きざ]んだ "cut it up small so the CHILD would eat it") — ために needs one shared subject across both clauses and cannot switch agents at all.
Lookalikes
Same ように string, different grammar — ようになる is a fixed idiom marking a gradual change (話[はな]せるようになった), while purpose ように is a free clause connector that can precede any main verb naming a deliberate action (電車[でんしゃ]に間[ま]に合[あ]うように急[いそ]いだ); if the word right after ように isn't なる, this is the purpose connector, not the change-of-state idiom.
Same ように string again — ようにする anchors a standing habitual effort with する itself as the main predicate (毎朝[まいあさ]走[はし]るようにしている), while purpose ように is subordinate to a DIFFERENT main verb naming the concrete action taken to reach the goal (急[いそ]いで書[か]いた, not ように書いた alone); ようにする's ように never stands directly before any verb but する/している/した.
Both can gloss as "in the way that," but とおりに demands a concrete PRIOR reference being reproduced exactly (先生[せんせい]が言[い]ったとおりに書[か]いた "wrote exactly as the teacher said"), while ように names an approximate goal with no prior utterance required (聞[き]こえるように話[はな]す "speak so as to be heard") — とおりに freely takes a past-tense verb before it, but purpose-ように never follows a past clause (×聞[き]こえたように話[はな]す is odd).