Knowing the full difference between wa and ga particles is tricky. The basics you can grasp in one lesson, but the subtleties take longer. In some ways they are equivalent to English “a” and “the”.
Nothing complicated about “a” and “the” you may say. You’d be surprised.
Even very advanced Japanese speakers of English sometimes say “a” when they should say “the” and vice versa. I have spent time trying to explain to Japanese speakers why they should be using one rather than the other on particular occasions – and when you actually try to codify the usages rather than just doing them by instinct you realize how extremely subtle and intricate they are.
The wa and ga particles are in some respects very similar to “a” and “the” and perform parallel functions in many cases.
Let’s look at a very simple song (which happens to be one of my favorites) and see how the wa and ga particles are used:
The song begins with two simple statements.
Anpan ni wa anko wa haitte(i)ru
There is anko in anpan
Melonpan ni wa melon ga haitte(i)nai.
There is no melon in melonpan.
The first question that might be asked is, why do we begin designating the two breads with wa? It is often said that wa, being like “the”, should only be used for something that has already been introduced. As in:
Mukashi mukashi, chiisai onnanoko ga imashita.
Once upon a time there was a little girl.
Onnanoko wa kokoro-yasashii deshita.
The little girl was kind hearted.
In the first sentence the ga particle is used because the little girl is being introduced (equivalent to a girl) and in the second the wa particle is used because we already know who she is (equivalent to the girl).
So why are anpan and melonpan introduced with the wa particle?
Aside from the fact that the subject is what is in the breads (and you can’t use ni ga), more importantly for our purposes anpan and melonpan are things we already know about. They are not particulars but generalities.
If I say “the pencil is on the desk” (equivalent to enpitsu wa tsukue no ue ni arimasu) completely out of context you will rightly say “what pencil?” If you don’t know any pencil I should have said “a pencil is on the desk” (equivalent to enpitsu ga tsukue no ue ni arimasu) – or more idiomatically “there is a pencil on the desk”. After this we can refer to the pencil with wa as it is a known pencil: “the pencil”.
However, if I say “pencils are useful” I am not referring to a particular pencil that you don’t know anything about. I am referring to pencils in general, which you do know about. In English we do not use either “a” or “the” for such things. We drop the article completely (often a point of confusion for Japanese people who frequently try to use “the” here).
In Japanese, the general is treated the same as the familiar so long as the general is familiar. So we can use wa with something that wasn’t introduced if we can assume the hearer knows about it.
This is what is happening here. Melonpan and anpan are general, known things, like pencils. They can take wa without an introduction.
Now there is a second wa-ga particle usage in this couplet:
Anpan ni wa anko wa haite[i]ru
There is anko in anpan
Melonpan ni wa melon ga haitte[i]nai.
There is no melon in melonpan.
Why is the wa particle used here? The usual, neutral usage is the one used in the second line. Melon is in a state of not having entered. It normally takes ga, as it does here. So why the wa particle in the first line?
If you read the two lines in English you will notice a slight awkwardness. You would expect the second line to say something like: “But there is no melon in melonpan”. In other words to make some indication of the distinction between the situation with anpan vs melonpan, not simply to treat them as two completely unrelated sentences.
Well, that is what the first wa particle is doing. It is the wa of distinction. Often it would imply “Anko (as opposed to other things) is in it”. Here it means “Anko is (as opposed to other cases) in it. This may be a slightly loose use of the grammar – the song is quite childlike – but the meaning is clear enough.
Having established what is (or isn’t) in what bread, the singer tells us:
watashi ga ichiban suki na no wa melonpan [da/desu]
My favorite (bread) [is] melonpan
Now we have all learned to say watashi wa ocha ga suki desu. Tea is in the state of being liked. It takes ga. I am the liker so I take wa. Literally “In relation to me, tea is likeable”. Saying Arisu-san wa suki desu (for I like Alice) is a mistake as it will lead the hearer to wonder “what does Alice like?”
So why is it the other way around here?
Let’s look at how the sentence is structured. The wa-marked topic of this sentence is actually の no. It is used in the sense of “one” as in this rather textbooky interchange:
Dono enpitsu ga hoshii desuka?
“Which pencil do you want?”
Akai no ga hoshii desu.
“I want the red one“.
In the song the girl is referring to “my favorite one”, in this case meaning “favorite bread” or “favorite thing to eat”. This is the wa-marked topic of the sentence and everything that goes before it qualifies that pronoun.
So ichiban suki na qualifies no and watashi ga qualifies ichiban suki na no. Then the entire noun-phrase, watashi ga ichiban suki na no, takes the wa-particle to mark it as the topic.
The sentence is actually of the very simple type everyone learned in her first lesson: A wa B [da/desu] – as in watashi wa Amerikajin (desu) etc.
の no is A and everything before it simply qualifies の and is therefore part of A.
B is “melonpan” with the da/desu left off.
You can never use wa in a noun-qualifying phrase. This is natural, since what is essentially only part of a noun (or noun-phrase) cannot be the topic. So anything that would normally be marked with the wa particle will be marked with the ga particle when it is in a subordinate clause like this.
The whole clause (including suki, which is here used adjectivally) adds up to a noun-phrase which is the topic of the sentence, so we use the wa particle and then say what it is equivalent to (in this case, melonpan), just as we did right at the beginning of learning Japanese.
In fact, we will usually find that even the most complicated sentences in Japanese can be boiled down to the three or four basic sentence-patterns we learned right at the beginning.
Like “a” and “the” for Japnese people, the wa and ga particles take time fully to understand, but I hope this gives you a clearer idea on some of the ways they work.