The product of a function that vanishes at infinity and a continuous bounded one Let $X$ be a Hausdorff completely regular space. Let $B(X)$ denote the algebra of real bounded functions, and let
$$B_\infty (X) = \{ f \in B (X) \mid f^{-1} ([r , \infty)) \text{ is compact} \ \forall r>0 \}$$
be (by definition) the subalgebra of the functions that vanish at infinity.
I don't think that $B_\infty (X)$ is an ideal,

but if $f \in B_\infty (X)$ and $g$ is continuous and bounded, does $fg$ vanish at infinity? (Take them positive, for simplicity.)

Empirical evidence suggests so (for instance, try $f$ the characteristic function of some compact subset), but I am looking for a proof.
Notice that if $r>0$ is fixed and $K_r = \{ x \in X \mid f(x) g(x) \ge r \}$, then $x \in K_r$ implies $g(x) \ne 0$, therefore
$$K_r = \bigcup _{t>0} \left\{x \in X \mid g(x) = t \text{ and } f(x) \ge \frac r t \right\} = \bigcup _{t > 0} g^{-1} (\{t\}) \cap f^{-1} \left( \left[ \frac r t, \infty \right) \right)$$
and this leads nowhere, since an arbitrary union of compact subsets is not necessarily compact, not even closed.
 A: It turns out to be trivial, but not in an obvious way. Since $f$ is positive and vanishes at infinity, it is upper-semicontinuous. Since $g$ is continuous, it too is upper-semicontinuous. Since both are assumed positive (an essential hypothesis), it follows that $fg$ is upper-semicontinuous (see Proposition 2 on page 362 of Bourbaki's "General Topology: Chapters 1–4"), therefore $(fg)^{-1} ([r, \infty))$ is closed for all $r>0$.
Next, since $g$ is bounded, for every $r>0$ we have $(fg)^{-1} ([r, \infty)) \subseteq f^{-1} \left( \left[ \frac r {\sup g}, \infty \right) \right)$ which is compact by assumption. Since $(fg)^{-1} ([r, \infty))$ is a closed subset of a compact one, it itself is compact, hence $fg$ vanishes at infinity.
It seems that the topological hypotheses on $X$ (being Hausdorff and completely regular) may be dropped, since they don't appear to be used anywhere.
A: I will take a shot at this.  This proof seems too simple.
I am going to assume you really meant to define $B_\infty$ by (see Paul's comment) 
$$
B_\infty(X)=\{f\in B(X)\, |\ |f|^{-1}([r, \infty)) \mathrm{\ is\ compact\  }\forall r>0\}
$$
where $|f|^{-1}([r, \infty)) := \{x\in X |\  \mathrm{abs}(f(x))\geq r\}$.
Let $h(x):=f(x)g(x)$ where $f(x)\in B_\infty(X)$, $g(x)\in B(X)$, $g$ is continuous, and $m=\sup_x |g(x)|$. Then for any $r>0$,
$$
|h|^{-1}([r, \infty))\subset |f|^{-1}([r/m, \infty))
$$
which is compact and $|h|^{-1}([r, \infty))$ is closed, so $|h|^{-1}([r, \infty))$ is compact.  This proves that $h\in B_\infty(X)$.
Why is $|h|^{-1}([r, \infty))$ closed?
Assume $x_n\rightarrow x$ and $\{x_n\}\subset |h|^{-1}([r, \infty)).$  We will prove that $x\in |h|^{-1}([r, \infty)).$  Let $z=|g(x)|$. Then
$$\liminf_{n\rightarrow\infty}|h(x_n)|\geq r,$$
$$\liminf|f(x_n)||g(x_n)|\geq r,$$
$$\liminf|f(x_n)|z\geq r, \quad \mathrm{and}$$
$$\liminf|f(x_n)|\geq r/z.$$
So for every $\epsilon>0$, there exists and $N_\epsilon\in\mathbb N$ s.t. $|f(x_n)|>r/z-\epsilon$ when $n>N_\epsilon$. 
Thus, for all $\epsilon>0$, $x_n\in |f|^{-1}([r/z-\epsilon, \infty))$ when $n>N_\epsilon$ and consequently $x\in |f|^{-1}([r/z-\epsilon, \infty)).$
We can conclude that $|f(x)|\geq r/z$ and hence
$$|h(x)| =|f(x)g(x)|= |f(x)|z\geq r$$
proving that $x\in |h(x)|^{-1}([r, \infty))$ and proving that $|h(x)|^{-1}([r, \infty))$ is closed.
