The most basic operations in mathematics, after addition and multiplication, are powers and roots. An exponent tells you how many times to multiply a base by itself: \(a^n\) means \(a \times a \times \cdots \times a\) repeated \(n\) times. Two facts anchor all the rules that follow. Any nonzero number raised to the zero power equals one, because \(a^n / a^n = a^0 = 1\), and a negative exponent means the reciprocal of the corresponding positive power, so \(x^{-n} = 1/x^n\). These definitions preserve the elegance of the exponent rules across all integers and, ultimately, all real numbers.
The rules for combining powers follow directly from how multiplication behaves. Multiplying two powers with the same base adds their exponents: \(x^a \cdot x^b = x^{a+b}\). Dividing subtracts them: \(x^a / x^b = x^{a-b}\). Raising a power to another power multiplies them: \((x^a)^b = x^{ab}\). And when an exponent applies to a product or a fraction, it distributes to every factor: \((xy)^n = x^n y^n\) and \((x/y)^n = x^n / y^n\). Together these rules let you simplify almost any expression involving powers.
Roots and fractional exponents are two ways of describing the same operation. The square root of \(a\) is the non-negative number whose square is \(a\), while the \(n\)th root \(\sqrt[n]{x}\) is the number whose \(n\)th power is \(x\). Fractional exponents combine a root and a power: \(x^{m/n} = \left(\sqrt[n]{x}\right)^m\). Square roots obey the same distribution rules as exponents: \(\sqrt{ab} = \sqrt{a}\sqrt{b}\) and \(\sqrt{a/b} = \sqrt{a}/\sqrt{b}\). When a radical appears in a denominator, multiplying by a clever form of one (rationalizing) clears it cleanly.
Logarithms answer the inverse question: given a base and a result, what exponent produced it? The definition \(\log_b(x) = y \iff b^y = x\) makes clear that logs and exponentials are two sides of the same coin. Special cases include the common log base 10 and the natural log base \(e \approx 2.718\). Three rules govern how logs behave: \(\log_b(xy) = \log_b x + \log_b y\), \(\log_b(x/y) = \log_b x - \log_b y\), and \(\log_b(x^n) = n \log_b x\). The change-of-base formula lets you rewrite any logarithm in any convenient base. These properties are essential throughout machine learning because they convert multiplication into addition (which is what makes log-likelihoods tractable) and because they tame the exponential growth of quantities like probabilities and information content, where \(-\log_2(p)\) measures the surprise of an event with probability \(p\).