# How does works a bandpass filter?

My question is about the action of a bandpass filter. First, I have a temporal signal. I convert it in a spectral signal via a FFT. Now, I want to apply a bandpass filter on that spectral signal. But my question is : how to do it ?

My temporal signal is a real signal so, I understand how to multiplicate by a coefficient. But my spectral signal is complex so, what do I have to do ? Multiplicate the real part and the imaginary part by the coefficient ?

You're wanting the magnitude of your spectrum to decrease in certain areas (since you're trying to filter out those frequencies). So, yes, you could just multiply your real and imaginary components but your coefficient. For example, if you have a number $5 -5i$, the magnitude is $\sqrt{5^2 + (-5)^2} = 5\sqrt{2}$ if you want to decrease this magnitude by 50% you would just multiple your real and imaginary numbers by .5. This can be seen by $\sqrt{(5*.5)^2 + (-5*.5)^2} = 2.5\sqrt{2}$