3. Given that $a$ and $b$ are non-zero constants. If $M=a \sin \theta+b \cos \theta$, $N=\sqrt{a^{2}+b^{2}} \sin \left(\theta+\arctan \frac{b}{a}\right)$, then for any $\theta$ ( ).
(A) $M=N$
(B) $M \neq N$
(C) Only when $a>0$, $M=N$
(D) Only when $b>0$, $M=N$
3. (C).

It is easy to know that $M=\sqrt{a^{2}+b^{2}} \sin (\theta+\varphi)$, where $\cos \varphi=\frac{a}{\sqrt{a^{2}+b^{2}}}, \sin \varphi=\frac{b}{\sqrt{a^{2}+b^{2}}}$.
If $M=N$, then $\varphi=2 k \pi+\arctan \frac{b}{a}$.
Also, $\arctan \frac{b}{a} \in\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$, hence $\cos \varphi>0, a>0$.