how inner products are defined on a vector space? How do mathematicians define inner product on a vector space. 
For example: $a = (x_1,x_2)$ & $ b =(y_1,y_2) $ in $ \mathbb{R}^2.$ 
Define $\langle a,b\rangle= x_1y_1-x_2y_1-x_1y_2+4x_2y_2$. It's an inner product.
But how does one motivate this inner product? I think there is some sort of matrix multiplication between some vectors.
 A: The abstract definition of an inner product of real-valued vectors is a function $\langle \, , \rangle: \mathbb R^n \times \mathbb R^n \to \mathbb R$ satisfying the following axioms, where $\alpha$ and $\beta$ are scalars and the $x$'s and $y$'s are vectors.


*

*$\langle \alpha x_1 + \beta x_2, y \rangle = \alpha\langle x_1, y \rangle + \beta\langle x_2, y \rangle$

*$\langle x, \alpha y_1 + \beta y_2 \rangle = \alpha\langle x, y_1 \rangle + \beta\langle x, y_2 \rangle$

*$\langle x, y \rangle = \langle y, x \rangle$

*$\langle x, x \rangle \geq 0$ and $\langle x, x \rangle = 0$ if and only if $x$ is the zero vector.


Conditions (1) and (2) tell us that an inner product should be linear in both its arguments.
In addition, condition (2) is not strictly necessary, as conditions (1) and (3) imply it.
This definition also extends to arbitrary vector spaces, not just over $\mathbb R$.
A: Every positive-definite matrix $M$ is associated to an inner product when viewed as a quadratic form. In this case the matrix is $M=\begin{pmatrix}1&-1\\-1&4\end{pmatrix}$ and the inner product is given by $\langle x,y\rangle=x^TMy$.
A: Inner product $\langle u,v\rangle$ doesn't depend on the choice of basis. In the given basis $\langle u,v \rangle =x^TMy$.
Every real symmetric matrix is orthogonally diagonalizable: $M=Q^TDQ$, and in the new, "rotated", coordinates $\langle u,v\rangle=x^TMy=x^TQ^TDQy=(Qx)^TD(Qy)=\tilde{x}^TD\tilde{y}$.
The diagonal matrix $D$ consists of the (positive) eigenvalues of the original matrix $M$. By applying a non-uniform scaling transformation one could use the scaled coordinates to write a more familiar $\langle u,v\rangle=\hat{x}^T\hat{y}$.
