How does adding big O notations works

can someone please explain how adding big O works.

i.e. $O(n^3)+O(n) = O(n^3)$

why does the answer turn out this way? is it because $O(n^3)$ dominates the whole expression thus the answer is still $ O(n^3)$


Big $O$ notation is the upper bound notation, so given two functions, such that $f\in O(g)$ ($f$ is upper bounded by $g$ to the linear constant from some point) the sum $O(f) + O(g) = O(g)$, and as $n \in O(n^3)$ (meaning $n$ too is bounded in the limit by some multiple of $n^3$) we have also that $O(n)+O(n^3)=O(n^3)$. It can be seen as a "domination" that you refer in the question.