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.

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$.
