に and で Explained
That quiz was followed by this explanation of these two particles:
When to use で：
Use で when talking about the means of doing something or the place that something happens or is done.
When to use に：
Use に when talking about a destination (both literal and figurative) or a recipient of an action. A "destination" includes the place where something has ended up (i.e. where something is now or where something was put). に can also change na-adjectives into adverbs.
That's a pretty succinct overview, so I thought it might help to look at the usage of these particles a bit more thoroughly...
で to mark "the means of doing something"
We saw this sentence:
でんしゃ で いきます。
I’ll go by train. // We’ll go by train.
Literally: “train + で + go.”
If you teach English to a Japanese person, I would wager that you're much more likely to hear them say something like "I go to work by train" than something like "I take the train to work."
I think the reason for this is that the English textbooks that Japanese schoolchildren use find it very convenient to say that で means "by" when talking about the means of doing something.
To rephrase that, if you are using a tool to accomplish some action, then the particle で will often come directly after the tool in your sentence.
That's why で came right after the word 電車 (でんしゃ // train) in the last sentence, and that's why it comes after "iPad" in the following sentence:
まいにち アイパッド で しんぶん を よんでいます。
I read the news(paper) on my iPad every day.
Literally: “every day + iPad + で + newspaper + を + am reading.”
で to mark the location something is done
で can also be used to mark the location that an action was performed.
For example, we saw:
その くつ かわいい ね。 どこ で かった の？
Those are cute shoes. Where did you get them?
Literally: “those + shoes + cute + ね. + where + で + bought + の？”
I'm going to come back to this usage in just a moment when we look at "に to mark the location of something," but first I want to look at...
に to mark a destination
It can often help to think of the particle に as meaning "to" (though we cannot do so 100% of the time).
This is because に marks (=comes right after) a noun that is a destination. For example:
いま えき に むかっています。
I’m on my way to the station right now.
Literally: “now + station + に + am heading for.”
Note that this destination can also be something like a pocket that you put something in(to):
おつり を スカート の ポケット に いれました。
I put the change in my skirt pocket.
Literally: “change (i.e. money) + を + skirt + の + pocket + に + inserted.”
The "destination" marked by に can also be a figurative destination of something, in the way that the "destination" of what is said is "Mom" in the following sentence:
おかあさん に いわないで ね。
Don’t tell Mom, OK? [Don't say anything to Mom, OK?]
Literally: “mother + に + don’t say (and) + ね.”
If that seems confusing, it might help to just imagine that に also describes where something is directed or the recipient of an action.
に to mark a changed state
I'm tempted to lump this in with the "figurative destination" category described above, but に can also be use to mark the new form that something takes.
In other words, the "destination" marked by に might be the result of a "transformation."
We saw this example:
しずか に して。
Will you be quiet?
Literally: “quiet + に + do (and).”
In a semi-literal translation of the above sentence, we could have written "Make it quiet." That is, "quiet" is the changed state, and it is marked by に.
It can help to remember this usage of に by looking at the verb なる, "to become," which always follows the particle に：
かのじょ は いしゃ に なりました。
She became a doctor.
Literally: "she + は + doctor + に + became."
The "new state" is "doctor," so we mark "doctor" with に, then follow it with our verb of transformation (=なる, "to become").
に to mark the location of something
When the purpose of your sentence is to describe the location of something, you mark the location with に.
いま かれし の いえ に いる。
I’m at my boyfriend’s house right now.
Literally: “now + boyfriend + の + house + に + am.”
Be careful! Because this is when people start mixing up で and に.
In the above sentence, the speaker uses に because she is describing where she is now.
It's easy to spot sentences where に should be marking the location of something, because these sentences use the verbs for "to be," ある (for non-living things) and いる (for living things).
Here's an example with ある：
Where are the strawberries?
Literally: "strawberries + where?"
れいぞうこ に ある。
They're in the fridge.
Literally: "refrigerator + に + are."
But what if the verb in the sentence is not ある or いる？ Well, in such cases, the verb is most likely describing an action that is taking place. And when we describe the place that something is done, we use で, yeah?
かれし の いえ で りょうり した。
I [We] cooked at my boyfriend's house.
Literally: “boyfriend + の + house + で + cooking + did.”
When I first learned Japanese, I associated に with "movement." I mean, it means "to" or "in(to)" in so many cases, that it seemed like a good idea to think that I should use に when I am describing the movement of something from one location to another.
As a result, though, I sometimes got confused about using に when no movement was occurring.
For example, we had this sentence:
きのう えき で せんせい に あいました。
I saw [ran into] my [the (our)] teacher at the station yesterday.
Literally: “yesterday + station + で + teacher + に + met.”
The location (=the station) where the action (=meeting/seeing) is occurring is marked by で. That is, で is marking the place that an action is done, as is always the case.
The figurative destination (or "recipient," if that's easier for you) (=teacher) of the action (=meeting/seeing) is marked by に.
So everything in that sentence is in order. But for some reason, as a beginner I was always tempted to use に where I should use で in sentences like this, particularly when it was the only particle in the sentence.
I was always tempted to say:
✕ えき に あいました。
✕ I met a station.
✕ Literally: “station + に + met.”
When I should have said:
〇 えき で あいました。
〇 We met at the station.
〇 Literally: “station + で + met.”
It seems like a silly mistake to make now. But hey, give me a break. Particles are confusing when you're a beginner!
に to mark the time of something
I could make up some long-winded explanation about how に is a "figurative destination" or something for this, but instead let's just remember that に is used to mark the time that something occurs:
はちじ に いく。
I’ll go at eight.
Literally: “eight o’clock + に + go.”
に to convert adjectives into adverbs
If you put に after a na-adjective, it becomes an adverb.
For example, here is a sentence with a na-adjective:
きれいな おはな です ね。
That's a pretty flower, isn't it? // Those are pretty flowers, aren't they?
Literally: "pretty + flower + です + ね."
We put the particle な after our na-adjective 綺麗 (きれい // pretty) because な always goes between na-adjectives and nouns (the noun in the sentence is お花, "flower").
But when the word after our na-adjective is a verb, then we need to change our na-adjective into an adverb. We do that by putting に after it, as we saw in this sentence:
きれい に かいて ね。
Write neatly, OK?
Literally: “clean / pretty / neat + に + write (and) + ね.”
That might seem like a lot of rules, but you will reach a point in your studies when rules about particle usage, verb conjugations, and all of that boring stuff will start to feel natural.
Until then, you're probably going to overthink things... which is fine, but don't get stressed about it.
Even if you mess up your usage of particles, in most cases people will understand what you want to say. And as you get better, you'll realize how many dumb and incorrect things you've said over the years, and the shame will burn these rules into your memory. ^^