I want to prove or disprove that $x^T (A+B) x = x^T Ax + x^T Bx$ where $x \in \mathbb{R}^l$ and $A,B$ are $l\times l$ matrices. I think this statement is true, but the only way I can think of as proving is writing out the matrices vectors and doing algebra. Is this the only way? Can you guys think of more clever way to prove this statement?
Matrix multiplication is distributive with respect to product; i.e. given three matrix $A,B,C$ then $A(B+C)=AB+AC$ and $(A+B)C=AC+BC$. (Of course, when the dimensions make sense to multiply). This being said, you can think of $x^T$ and $x$ as matrix, and using the algebra explained you get $$x^T(A+B)x=(x^TA+x^TB)x=x^TAx+x^TBx.$$