# The Linear Discriminant Analysis Rule

Given there are two classes A and B and the prior probability of belonging to $$A = Na/N$$ and $$B = Nb/N$$, I want to show that the linear discriminant analysis rule classifies an observation x to class B if:

$$x^TΣ(μ_{B} −μ_{A})> \frac{1}2μ^T_{B}Σ^{-1}μ_{B}−\frac{1}2μ^T_{A}Σμ_{A}+log(N_{A}/N) −log(N_{B}/N)$$

I'm very new to this platform so I am unsure about how to code my math into this post! What I've done is attached my written attempt in a photo.

Is my line of thinking correct?

Any help at all would be greatly appreciated. Thank you!