A vector is an element of a vector space. If a vector space has an inner product that inner product gives each vector $x$ a magnitude ($\Vert x\Vert=\sqrt{\langle x,x\rangle}$) and each pair of vectors $x$, $y$ an angle $\arccos(\langle x,y\rangle/\Vert x\Vert\Vert y\Vert)$.
Mathematicians consider inner products optional for vector spaces, although many examples of vector spaces have inner products.
Let $C([0,1])$ be the space of continuous functions $[0,1]\to\mathbb C$. The following equation defines an inner product on this space.
$$ \langle f,g\rangle=\int\limits_0^1 f(x)\overline{g(x)}dx$$
The following formula defines en inner products for polynomials $p(x)=p_0+p_1x+p_2x^2+\dotsm+p_mx^m$ and $q(x)=q_0+q_1x+q_2x^2+\dotsm+q_nx^n$ with coefficients in $\mathbb C$.
$$ \langle p,q\rangle = \sum^{\min(m,n)}_{i=0} p_i\overline{q_i}$$
Matrices have the Frobenius inner product of which the dot products on $\mathbb C^n$ is a special case.
$$ \langle M,N\rangle =\mathrm{trace}(MN^*)=\sum_{i,j} M^i_j\overline{N^i_j}$$
The examples help to show that inner products are ambiguous, which is the reason that they are optional. The inner product on $C([0,1])$ diverges on some pairs of functions in $C(]0,1[)$ despite the (superficial) similarity between $[0,1]$ and $]0,1[$. Each vector space (over $\mathbb R$ or $\mathbb C$) has many different inner products. Polynomials have the following alternative for example.
$$ \langle p,q\rangle = \sum^{\min(m,n)}_{i=0} \frac1{i!}p_i\overline{q_i}$$