>She seems to be in a better mood than she was in before. <code>CORRECT</code>

>She seems to be in a better mood than what she was in before. <code>INCORRECT</code>

**Than** is a conjunction that connects two clauses or coordinates words in the same clause.

In this case, <code>*she was in before*</code> is the **subordinate clause**, and more specifically a type of subordinate clause known as a **comparative clause**, which usually follows the **comparative form of an adjective or adverb** (in this case <code>*better*</code> is the comparative form of the adjective *good*), and begins with *than*, *like*, or *as* (in this case <code>*than*</code>).

-----

# Why is the first example correct?
>She seems to be in a better mood than she was in before. <code>CORRECT</code>

In this example, the main clause <code>*She seems to be in a better mood*</code> is **defining** the **subject** as <code>*She*</code>, the **object** as <code>*better mood*</code>, and the **verb** as <code>*seems*</code> (where <code>*seems to be*</code> follows a 'Seem + *to*-infinitive format and <code>*be*</code> is the linking verb).

Because those have been defined in the **main clause**, we do not need to (but can if we want) repeat the process of defining them in the **subordinate (comparative) clause**, unless we want to change or add meaning.

To illustrate this I'll use two grammatically correct examples, which have slightly different meanings.

>She seems to be in a better mood **than before**. <code>CORRECT</code>  
<sub>**Meaning:** The subject, <code>*She*</code>, **seems to be** in a better mood than she **seemed to be** before</sub>.

>She seems to be in a better mood **than she was before**. <code>CORRECT</code>  
<sub>**Meaning:** The subject, <code>*She*</code>, **seems to be** in a better mood than she **was** before</sub>.

Notice that by adding <code>*she was*</code>, you are changing the **meaning** because now you're saying that she *definitely was* in a better mood than she *seems to be now*, whereas without the <code>*she was*</code>, you're saying that she *seemed to be* in a better mood before than she *seems to be* now.

So, because you defined everything in your main clause, there was no need to do it again in your subordinate clause, but you did, by adding <code>*she was*</code>, you changed the verb from *seem* to *is*, which changed the meaning. Both are grammatically correct, but mean different things.

------
# Why is the second example incorrect?
>She seems to be in a better mood than what she was in before. <code>INCORRECT</code>

In your **main clause**, <code>*She seems to be in a better mood*</code>, you are saying that the **subject**, <code>*She*</code>, seems to be in the **object**, which you have defined as <code>*mood*</code>.

So the reader already knows what she was in, we do not need to define it a second time in the **subordinate clause** unless we **want to change the meaning**.

When you say <code>*than **what** she was in*</code>, you are saying that she was in something else, something *other* than a <code>*mood*</code>, or a <code>*good mood*</code>, but the reader cannot discern from this sentence what it was that she was in. Was she in a house? In a trance? In a movie? All we know is that she was <code>*in*</code> a common noun.

By using *what* in the subordinate clause like that you are explicitly implying <code>*she*</code> was in something, a thing (common noun), *something other than a mood*, without actually defining what that thing is, rendering it nonsensical.

This sort of structure is not *always* incorrect, though, and is used often as a metaphor.

Example:
>His car is a hell of a lot better **than what** he was driving before. <code>CORRECT</code>  
<sub>**Meaning:** The subject, <code>*car*</code>, **is** much better than **the thing** he was driving before.</sub>

Notice how in this example, the writer is using the <code>*than what*</code> structure to refer to an undefined common noun, **a thing**, that <code>*he*</code> was driving before. We can assume from the verb <code>*driving*</code> that whatever the **thing** was, at least we know it was drivable, but technically speaking, from a grammatical stance, it could be referring to absolutely anything, any common noun, any **thing** that can be driven (and note that it could be driven according to all definitions of *drive*, and it could be driven metaphorically). We can't know because the writer is awkwardly leaving it undefined.

In this example, though, we can infer that it is a metaphor used to refer to the **subject's** previous vehicle as a 'thing', to denote condescension, to denote a sense of inferiority when compared to the <code>*better*</code> car that he is driving now.

In short: sometimes it can be used correctly, but one has to understand exactly what meaning they are trying to convey before consulting grammar and structuring a sentence correctly.