Why was $\vec{A}\cdot\vec{B}$ defined as $|\vec{A}||\vec{B}|\cos \theta$? Why was $\vec{A}\cdot\vec{B}$ defined as $|\vec{A}||\vec{B}|\cos \theta$? Historically what is the underlying idea?
 A: I think it's the other way round. First, people became interested in the projection of one vector onto another, $|a||b|\cos(\theta)$, then saw this was equivalent to the usual inner product in $\mathbb{R}^n$ $(\sum x_i y_i)$, and only afterwards was a general notion of an inner product space conceived, as a generalization of the intuitive space in $\mathbb{R}^3$.
For more on the topic, I'd suggest A History of Vector Analysis , in which the author expounds upon Grassman's initial discoveries and definition of the inner product, as well as Gibbs's later independent dicoveries and usage.
A: Because it is fundamentally linked to the solution of practical problems in mathematics and physics.  In physics we often find ourselves needing to decompose a vector into components.  For example when we think about acceleration as a vector, we are often concerned with its components in the tangential and normal directions.  The dot product helps us do that.  The dot product also shows up in the definition of work and flux.  In mathematics it is prevalent in linear algebra as well as vector algebra and vector calculus (Divergence Theorem, Stokes Theorem).  Because the idea of projection appears in so many places, it warranted its own definition and notation.
