〜と同じ・〜と違う
the same as; different from
Noun + と同じ / と違う · 同じ + Noun
Sign up free to review this point on a spaced schedule.
と同じ means "the same as": 私の誕生日は兄の誕生日と同じです, "my birthday is the same as my brother's". と違う means "different from": これはあれと違います.
同じ is unusual: it goes straight in front of a noun, with no な or の: 同じかばん, 同じ学校. So "the same bag as Tanaka" is 田中さんと同じかばん.
違う is a verb, so it conjugates: 違います, 違った, and 違って, which means "unlike": イギリスの夏と違って、日本の夏は暑い.
A and B can also both go before は: 兄と私は同じ学校に通っている, "my brother and I go to the same school". In speech, 同じ on its own often means "same here".
Examples
私の誕生日は兄の誕生日と同じです。
My birthday is the same as my brother's.
これはあれと違います。
This one is different from that one.
私も田中さんと同じかばんを持っています。
I have the same bag as Tanaka.
日本の夏はイギリスの夏と違って、とても暑いです。
Unlike British summers, Japanese summers are very hot.
兄と私は同じ学校に通っています。
My brother and I go to the same school.