Is the composition of two linear functions is a linear function?
By Emma Payne •
Suppose I have $2$ linear functions $f(x)$ and $g(x)$ would the $g(f(x))$ be a linear function as well? An example I wrote out was: $f(x) = 3x_1+4x_2$ and $g(x) = 7x_1+8x_2$
Is $g(f(x)) = 7(3x_1+4x_2)+8(3x_1+4x_2)= 21x_1+28x_2+24x_1+32x_2= 45x_1+60x_2$? If I'm wrong, can you please explain the reasoning as to why?
$\endgroup$1 Answer
$\begingroup$Suppose $f:U \to V$ and $g:W \to U$ are two linear functions, where $U,V,W$ are vector spaces over a field $k$. Then
$$f\circ g(w_1 + w_2) = f(g(w_1 + w_2)) = f(g(w_1) + g(w_2)) = f(g(w_1)) + f(g(w_2)) = f\circ g(w_1) + f\circ g(w_2)$$ where $w_i \in W$.
Similarly, for $\lambda \in k$, $$f\circ g(\lambda w) = f(g(\lambda w)) = f(\lambda g(w)) = \lambda f(g(w)) = \lambda f\circ g(w)$$ for every $w \in W$.
$\endgroup$ 3