Difference between 어디 and 어디서
어디서 doesn't only mean "from where" but many other cases where "in" or "at" can be used..
어디 is a contracted form of 어디에, which is an adverb constructed from 어디(where) + 에(location/position marker).
어디서 is a contracted from of 어디에서, which is an adverb constructed from 어디 + 에서(location/position marker).
So, you need to understand the difference between 어디에 and 어디에서, which comes down to that between 에 and 에서.
에 and 에서 are both widely used marker particles, but their difference is as follows when they refer to a location.
* 에 - to, onto, into, over to. 에 denotes the destination of a movement or other types of actions.
* 에서 - in, at, from. 에서 denotes the place where an action starts - it may finish in the same place or elsewhere.
So 에서 is a broad concept representing "where". "from where" only covers a part of its usage, since it also applies to actions that start and finish in the same place.
If someone hugs another person, the action is localized to a place, so only 에서 correctly describes it.
에서 applies to most common actions like taking a picture, studying, eating, having a meeting, and so son.
에 on the other hand applies to movements and migrations, like going or moving to some place, visiting a country, placing something somewhere, or taking a residence at a place, and so on, all of which are actions that originate someplace else and end up in the place marked by 에.
Examples:
- Where do you live? => 어디 살아요? 어디서 살아요? (both 어디 and 어디서 can work)
- Where are you from? => 어디서 오셨서요?
- Where did you buy this? => 어디서 사셨어요?
- Where should we eat? => 식사 어디에서 할까요?
- Where did you go last night? => 어제 저녁에 어디 가셨어요?
- Where did you put your keys? => 키[열쇠] 어디에 두셨어요?
- Where are you? => (너) 어디 있어? (Being somewhere implies having gone there temporarily, so 에)