The dot product is a special case of the more general inner product. Generally speaking, we if we have a scalar field $\mathbb{F}$ and a vector space $V$ over $\mathbb{F}$, the inner product is a type of mapping that assigns two vectors from $V$ a scalar from $\mathbb{F}$ and is denoted $\langle .,.\rangle$ where you replace the dots with vectors. More concisely, we write $$\langle .,. \rangle: V\times V \rightarrow \mathbb{F}.$$ $\mathbb{F}$ is either $\mathbb{R}$, the space of real numbers, or $\mathbb{C}$, the space of complex numbers.
It has some specific properties, which I will list. Let $\mathbb{F}=\mathbb{R}$ and $V$ be a vector space over $\mathbb{R}$. Let $v_1,w_1,v_2,w_2 \in V$ and $\alpha_1,\alpha_2,\beta_1,\beta_2 \in \mathbb{R}$.
- Multilinearity: $\langle \alpha_1 u_1+ \alpha_2 u_2 ,v_1 \rangle=\alpha_1 \langle u_1,v_1 \rangle + \alpha_2 \langle u_2,v_1 \rangle$ and
$\langle u_1,\beta_1v_1+\beta_2v_2 \rangle=\beta_1\langle u_1,v_1 \rangle + \beta_2 \langle u_1,v_2 \rangle.$
- Symmetry: $\langle u,v \rangle= \langle v,u \rangle$
- Positive definiteness: $\langle u,u \rangle \geq 0$ and $\langle u,u \rangle=0$ iff $u=0$
Show that for the vector space $\mathbb{R}^n$ over the field $\mathbb{R}$, for $v=(v_1,...,v_n), w=(w_1,...,w_n) \in \mathbb{R}^n$, $\langle v,w \rangle= \sum_{i=1}^{n}v_iw_i$ is a valid inner product. (This is the usual dot product).
If we let $\mathbb{F}=\mathbb{C}$, things change a little bit. Let $v_1,w_1,v_2,w_2 \in V$ and $\alpha_1,\alpha_2,\beta_1,\beta_2 \in \mathbb{C}$.
- Multilinearity: $\langle \alpha_1 u_1+ \alpha_2 u_2 ,v_1 \rangle=\alpha_1 \langle u_1,v_1 \rangle + \alpha_2 \langle u_2,v_1 \rangle$ and
$\langle u_1,\beta_1v_1+\beta_2v_2 \rangle=\overline{\beta_1}\langle u_1,v_1 \rangle + \overline{\beta_2} \langle u_1,v_2 \rangle.$
- Conjugate Symmetry: $\langle u,v \rangle= \overline{\langle v,u \rangle}$
- Positive definiteness: $\langle u,u \rangle \geq 0$ and $\langle u,u \rangle=0$ iff $u=0$
Here $\overline{\beta}$ means you take the complex conjugate of $\beta$.
Show that for the vector space $\mathbb{C}^n$ over the field $\mathbb{C}$, for $v=(v_1,...,v_n), w=(w_1,...,w_n) \in \mathbb{C}^n$ ,$\langle v,w \rangle= \sum_{i=1}^{n}v_i\overline{w_i}$ is a valid inner product.
Now the unanswered question is why we bother using this general definition of inner product. The answer lies in the fact that we want to define concepts like "orthogonality" and "projection" mean in vector spaces other than $\mathbb{R}^n$. One application of the inner product is that you can obtain the Fourier series of $f(x)$, which approximates $f(x)$ by sine waves and cosine waves. For more on that, check out my answer to this question: Origin of coefficients of fourier series?