Consider a body of mass $m$ on a smooth inclined plane with the normal force and weight labelled as shown:
Now, usually when the forces are broken into its components, we get an FBD like this:
From this we can obtain the equation:
$$ \Sigma F_\perp = 0\quad \implies\quad N = mg\cos(\theta) \tag1$$
However, I tried resolving the forces along the x and y axes and obtained a diagram like this:
But this time I got a different equation: $$ N\cos(\theta) = mg \tag2$$
Clearly, equation (1) and (2) aren't the same. So what am I missing here?