Okay, so I am studying the Japanese language and i am struggling to understand
the に and で particles fully. from what i understand the de particle shows an
action happening within a location, while ni shows the 'existence' of
something or a specific direction something goes in. My two examples being
ライブラリで眠った (i fell asleep in the library) and ライブラリにだった (i was in the
library(is it right to use datta? or should it be ita?)). Not sure if the
sentence is 100% but are they the correct particles in context?
CC BY-SA 3.0
2015-06-22T22:35:33.243
25258
2015-06-23T08:56:41.223
10431
question
word-choice particles
What's the difference between the ni and de particles?
You're on the right track. Off the top of my head, で denotes action at a
location, can also be used to connect multiple clauses in a sentence, means of
an action, and also cause of effect. に on the other hand is used for direction
of a subject, existence of a subject, or action at an event. For the most part
it should be relatively easy to distinguish when to use the two.

Examples:

`action at a location` 公園で遊んだ (I played at the park)

`connect multiple clauses in a sentence` うどんは日本の名物で美味しい。(Udon is popular
Japanese product and is delicious)

`means of an action` 車で学校へ行く。 (I go to school by car)

`cause of effect` 大雪で行かなかった。 (I didn't go because of\due to heavy snow)

`direction of a subject` デパートに行った。(I went to the department store)

`existence of a subject` 家にいる。(I'm at home)

`action at an event` 試合に勝って勝負に負けた。(I won the match but lost the contest.
Similar to saying winning a battle but losing the war)

The last example uses に twice to emphasize how you would use it in an action.
It would sound weird to insert で instead of に because the action happened at
an event and not a location.
CC BY-SA 3.0
2015-06-23T07:45:50.980
25270
2015-06-23T07:45:50.980
10428
25258
answer
your are right but you asked ライブラリにだった(I was in the library) is wrong you
should use ita...iru is a verb used for human and animated things. desu(datta)
is a sentence ending particle..
CC BY-SA 3.0
2015-06-23T08:56:41.223
25272
2015-06-23T08:56:41.223
10437
25258
answer