What connotation does なんだ add?


Specifically, in the expression

> 好き **なんだ** (I love you)

why not just say

> 好きだ

or

> 好きです

?




It's hard to answer this specific question without getting into the more
general topic of the ～のだ construction, which, as jkerian mentioned, can mark
an explanation for a certain context, which may be either explicit or
implicit. Put succinctly, ～のだ provides supporting information. This
information is often a reason, but it may be a cause, basis, conclusion,
restatement, or confession. Because it is supporting, ～のだ tends to shift the
focus away from the information it marks. (This is in contrast to ～から, which
often draws more focus toward the information it follows.)

(Bill Nye voice) Consider the following:

> A: (1) You weren't in the office last week, were you? (2) Did you go
> somewhere?
>
> B: (3) Yeah, I traveled with my family to Nagoya.
>
> A: (1) 先週、会社にいなかったね。 (2) どこかに行った **のか** 。
>
> B: (3) うん、家族で名古屋に旅行してきた **んだ** 。

In sentence (2), A asks a question with ～のか, the question form of ～のだ. This
connects the question to sentence (1) and shows that the answer to the
question will provide a basis for the fact that B wasn't in the office last
week. (Sentence (2) could actually be left out entirely. In this case, B may
anticipate sentence (2) as an unspoken question and answer with the exact same
sentence (3) as above.) In sentence (3), B provides the supporting information
that A is looking for, and since it is supporting information, it is marked
with ～のだ (～んだ in speech).

From an English perspective, a sentence without ～のだ looks exactly like one
with ～のだ, because in English we tend to leave these inter-sentence connections
unspoken. This is part of why the ～のだ construction is difficult to grasp. You
could theoretically force an English rendition, but at the expense of
naturalness:

> A: (1) You weren't in the office last week, were you? (2) **[Is this]
> because** you went somewhere?
>
> B: (3) Yeah, **[I wasn't in the office] because** I traveled with my family
> to Nagoya.

Now from general to specific. In your question, it's difficult to say why the
speaker would use 好きなんだ over 好きだ, since we have no context. But ～のだ is often
used in confessing something the listener would have a hard time knowing.
(This also counts as supporting information, since its purpose is to fill in a
gap in the listener's understanding.) So 好きなんだ would be preferable to 好きだ in
that context:

> ずっと前に気づいたけど、今まで言えなくてごめん……実は、○○くんのことが好きなんだ… （胸キュン！）

好きなんだ is better here because the first half raises a question in the
listener's mind (What hasn't she been able to say until now?). Since the
second half is designed to anticipate and answer that question, it's marked
with ～んだ. 好きだ would technically convey the same information, but without の/ん
you lose that connection between thoughts and the sentence doesn't flow as
well in Japanese.

