Let’s say V=Rn for a vector space, and also x,y,z∈V and k∈R.
⟨⋅,⋅⟩:V2→R is defined as the inner product on V when it satisfies the following four conditions:
(1) Symmetry: ⟨x,y⟩=⟨y,x⟩
(2) Additivity: ⟨x+y,z⟩=⟨x,z⟩+⟨y,z⟩
(3) Homogeneity: ⟨kx,y⟩=k⟨x,y⟩
(4) Positive-definiteness: ⟨x,x⟩≥0 and ⟨x,x⟩=0⟺x=0
In particular, when x=(x1,x2,⋯,xn) and y=(y1,y2,⋯,yn),
⟨x,y⟩=x⋅y=x1y1+x2y2+⋯+xnyn=xTy
is defined as the dot product or Euclidean inner product.
Explanation
The concept of vector spaces itself can be generalized for any field F. Naturally, the inner product can also be generalized, but in the basic level of linear algebra, it is common to deal only with Euclidean spaces.
However, the reason why inner product is confusing when learned in university is that it is sufficiently generalized compared to high school level. When considering the inner product by itself, if there exists a mapping that satisfies the conditions, there’s no particular reason to multiply components. The difference starts from ’the inner product we knew’ becoming ‘one of the inner products we learn in university’, which is the dot product. Not only that, it is generalized for n dimensions, and loses its geometric properties, which can bring great confusion to the definitions of size or angle between vectors.
[1]: ∥x∥=x⋅x is defined as the size or length of x.
[2]d(x,y)=∥x−y∥ is defined as the distance between x and y.
[3] For θ∈[0,π], cosθ=∥x∥∥y∥x⋅y is defined as the angle between x and y.
[4] When x⋅y=0, x and y are perpendicular is defined.
While up to 3 dimensions, it’s possible to manually calculate and visualize to see these definitions align with intuition, from 4 dimensions it becomes impossible. However, this kind of transcendental generalization is exactly the charm and strength of mathematics, and these definitions alone make it easy to generalize several theorems. See the two examples below.
Suppose two vectors x and y are perpendicular, then ∥x∥2+∥y∥2=∥x+y∥2
The Pythagorean Theorem also was originally valid for triangles on the plane. To generalize it, one needs to use the Pythagorean Theorem of a lower dimension step by step as we go higher in dimension, but using inner product makes it much easier and concise.