What is the intuition behind $x^T A x$?

Well if $A$ has entries $a_{jk}$ then $$x^TAx=\sum_{j,k}a_{jk}x_jx_k.$$

So $x^TAx$ is just a concise notation for a quadratic form.


I like to think about ${\bf x}^t {\bf A} {\bf x}$ geometrically.

Consider ${\bf x} = \{x,y,z\} \in \mathbb{R}^3$, and the special case ${\bf A}$ is the $3 \times 3$ identity matrix. Consider ${\bf x}^t {\bf A} {\bf x} = 1$ which, written out, is:

$x^2 + y^2 + z^2 = 1$, which is of course a sphere:

sphere

In short, you can think of ${\bf x}^t{\bf A}{\bf x}$ as leading to a scalar value throughout the space. When you solve for positions that give a particular value, you get a surface whose shape depends upon ${\bf A}$. Since the equation is a quadratic, you get spheres, ellipsoids and other quadratic surfaces.

If ${\bf x}^t {\bf A} {\bf x} = 4$, the sphere's radius is $2$.

If ${\bf A} = \{ \{ 3,0,0 \}, \{ 0,1,0 \}, \{0,0,1 \} \}$

then the equation is

$3 x^2 + y^2 + z^2 = 1$, or an ellipsoid:

ellipsoid

For other positive-definite matrices the surface will be tipped and elongated appropriately due to cross terms.

If ${\bf A}$ isn't positive definite we get other quadratics, e.g., if ${\bf A} = \{ \{1,0,0 \}, \{0,-2,0 \}, \{0,0,1 \} \}$ and we solve for ${\bf x}^t {\bf A} {\bf x} = 1$:

quadratic surface

Here are the surfaces for different values of the constant:

multiple quadratic surfaces