# Suppose f(n) = O(h(n)) and g(n) = O(h(n)). Is f(n) * g(n) = O(h(n) * h(n))?

I understand this should be a relatively easy proof, but I can't seem to understand how to do it.

I know that, by Big O definition:

• there exists some value $$c_1$$ where $$f(n) \le c_1 \cdot h(n)$$ for all $$n \ge n_0'$$
• there exists some value $$c_2$$ where $$g(n) \le c_2 \cdot h(n)$$ for all $$n >= n_0''$$

and I have to find some value $$c$$ and $$n_0$$ where

$$f(n) \cdot g(n) \le c \cdot h(n) \cdot h(n)$$ for all $$n \ge n_0$$

How would I search for those values $$c$$ and $$N_0$$? What would the first steps be?

• Hint: try $C = C_1 C_2$. Sep 26 '21 at 0:55
• Second half of hint: consider maximum of $N0'$ and $N0''$. Sep 26 '21 at 1:08
• Third half of hint: if $a \leq c$ and $b\leq c$, then $ab \leq c^2$. Dec 4 '21 at 10:06