I saw the following 2 options in an exam question:

> 私は__に行く
>
> a. 外で遊び  
>  b. 外へ遊び

The answer is '外へ遊びに行く'

Does 'で' also work here? What's the difference here?
CC BY-SA 4.0
2019-02-20T14:23:37.550
65596
2019-02-28T21:04:27.777
2019-02-23T15:26:49.637
10045
32689
question
grammar word-choice particle-に particle-で particle-へ
"外で遊びに行く" vs "外へ遊びに行く"
> **外へ** 遊びに **行く** (head outside to play)

-> The implication here is that the actor is not currently outside, and will _head out_ to play.

> **外で** 遊びに **行く**

-> This sounds odd because it means that the actor "goes to play" when he's already outside. It's not really clear where he would be going, if anywhere. 

This is similar to saying something like, " _go out outside_ " in English.
CC BY-SA 4.0
2019-02-20T18:14:39.600
65600
2019-02-23T02:58:00.177
2019-02-23T02:58:00.177
7055
7055
65596
answer
I think the fundamental thing here is that the main verb is 行く, which is a
movement verb and thus has a directionality associated with it. It requires a
destination.

For now, let's ignore the 遊びに, which is used to specify intent/purpose for the
行く action. Then the sentence basically boils downs to

> 外で行くvs 外へ行く

Here is where the directionality matters. 外 is a location, but で tells us that
we are already at 外. Yet, we don't know what the destination is, making this
is very confusing and unnatural. Meanwhile, へ is typically used to specify a
direction/destination, making it the natural choice here (に is okay too). Note
also that you could say 外で遊ぶ but not 外に遊ぶ or 外へ遊ぶ. This is because the verb 遊ぶ
doesn't have an directionality so it's natural to specify the location and
unnatural to use a direction/destination particle.

Okay, so let's talk about the 遊びに now. It's interesting because unlike with
many other parts of Japanese, moving this feels quite odd. However, because
both 外へ遊ぶ and 外に遊ぶ are just invalid, in this case it's rather straightforward
I think.

Thus, if you said

> 遊びに外へ行く

I think everyone would understand you. It's also grammatical. Because of this
I think it's fine to just consider the simplified case above to decide which
one to use.

There are some strange grammatical quirks thought about the Verbに行く
construction as mentioned in the comments on @sazarando's answer, so I'll talk
a bit about what I found with regards to that. In [_On restructuring
infinitives in Japanese:Adjunction, clausal architecture, and phases_ by
Masahiko
Takahashi](https://pdfs.semanticscholar.org/d4b5/8da6b451476121ffdab38c0dcd74c7fa853b.pdf),
he talks about the grammaticality of swapping the sentence

> 僕が図書館に本を借りに行ける

into

> 僕が[本を借りに]図書館に行ける

I think the interesting thing about this is that, first, the clause [本を借りに] is
considered optional and, secondly, that the clause moves as a unit. But, based
on the paper, I think this behavior is limited to when there is a clause where
the Vmasu in Vmasuに行く is being used (i.e. 友達に会い, 本を借り). So that situation
doesn't apply here because 外に遊ぶ and 外へ遊ぶ are just not grammatically valid.
CC BY-SA 4.0
2019-02-24T15:14:06.567
65687
2019-02-28T21:04:27.777
2019-02-28T21:04:27.777
10045
10045
65596
answer