Keeping it abstract, you have a line $L_1$ given by $\vec P + \lambda \vec v$, and you want to find a line $L_2$ perpendicular to $L_1$ and passing through an external point $\vec E$.
We want to find the point $\vec C$ on $L_1$ closest to $\vec E$, because then $L_2$ will be the line through $\vec C$ and $\vec E$.
The vector $\vec{CE}$ will be perpendicular to $L_1$, i.e. perpendicular to $\vec v$.
Finding $\lambda_C$ for $\vec C$:
$$\vec{CE}\cdot\vec v= \vec 0\\
(\vec E-(\vec P+\lambda_C \vec v))\cdot \vec v = \vec 0\\
(\vec E-\vec P-\lambda_C \vec v)\cdot \vec v = \vec 0\\
(\vec E-\vec P)\cdot\vec v=\lambda_C \vec v\cdot \vec v\\
\lambda_C = \dfrac{(\vec E-\vec P)\cdot\vec v}{\vec v\cdot \vec v}\\
$$
In your case, $\lambda_C = \dfrac{((4\mathrm i+3\mathrm j)-(2\mathrm i -\mathrm j))\cdot(3\mathrm i+2\mathrm j)}{(3\mathrm i+2\mathrm j)\cdot(3\mathrm i+2\mathrm j)}=\dfrac{(2\mathrm i+4\mathrm j)\cdot(3\mathrm i+2\mathrm j)}{9+4}=\dfrac{6+8}{13}=\dfrac{14}{13}$
Sub $\lambda_C$ into the equation for $L_1$ to get $\vec C$. Then $L_2$ is the line through $\vec C$ and $\vec E$.
The dot product is the special case of a more general concept, the inner product. If you have a vector space $ V $ over the reals or the complex numbers, then an inner product is a map $ f : V \times V \to \mathbb{C} $ or $ f : V \times V \to \mathbb{R} $ which is conjugate symmetric, positive definite, and linear in its first argument. We usually write $ f(u, v) = \langle u, v \rangle $, in which case these properties can be summed up as follows:
- Conjugate symmetry: $ \overline{\langle u, v \rangle} = \langle v, u \rangle $, where $ \bar{z} $ denotes complex conjugation. Note that this implies $ \langle u, u \rangle $ is always real for any vector $ u $.
- Positive definiteness: $ \langle v, v \rangle \geq 0 $ for any $ v \in V $, with equality holding iff $ v = 0 $.
- Linearity in the first argument: $ \langle \alpha u + \beta v, w \rangle = \alpha \langle u, w \rangle + \beta \langle v, w \rangle $ where $ u, v, w \in V $ and $ \alpha, \beta $ are in the field of scalars.
If $ V = \mathbb{R}^n $, then we can fix a basis $ B = \{ b_i \in \mathbb{R}, 1 \leq i \leq n \} $ and define $ \langle b_i, b_i \rangle = 1 $ and $ \langle b_i, b_j \rangle = 0 $ for $ i \neq j $. Extending this to all of $ \mathbb{R}^n $ by linearity gives us
$$ \left \langle \sum_{k=1}^{n} c_k b_k, \sum_{j=1}^{n} d_j b_j \right \rangle = \sum_{1 \leq k, j \leq n} d_k c_j \langle b_i, b_j \rangle = \sum_{i=1}^{n} c_i d_i $$
where positive definiteness is readily verified. You will recognize this expression as the definition of the dot product. Indeed, if we take our basis $ B $ to be the standard basis of $ \mathbb{R}^n $, then this inner product is the dot product.
Why is this formalism more powerful? A result about the inner product is the Cauchy-Schwarz inequality, which says that $ |\langle u, v \rangle| \leq |u| |v| $ where $ |u| = \sqrt{\langle u, u \rangle} $. This tells us that
$$ -1 \leq \frac{\langle u, v \rangle}{|u| |v|} \leq 1 $$
assuming that our field of scalars is $ \mathbb{R} $. We then see that the arccosine of this expression is well-defined, so we can define the angle between nonzero vectors $ u $ and $ v $ as
$$ \theta = \arccos \left( \frac{\langle u, v \rangle}{|u| |v|} \right) $$
The properties we expect to be true are then easily verified. This notion extends to infinite dimensional vector spaces over $ \mathbb{R} $, where defining angle is not at all obvious. It is then trivially true that we have $ \langle u, v \rangle = |u| |v| \cos(\theta) $, since that is how $ \theta $ was defined.
The cross product is an entirely separate concept which allows us to find a vector orthogonal to two given vectors in $ \mathbb{R}^3 $. In addition, its magnitude also gives the area of the parallelogram spanned by the vectors. These properties can be taken as the definition of the cross product (with appropriate care for orientation), or they can be derived as theorems starting from the algebraic definition.
Best Answer
Well, in a general way the dot product is an operation defined between two objects that satisfies some properties (check out this page on wikipedia for example: http://en.wikipedia.org/wiki/Dot_product), for a 3D vector it turns out that if you define the dot product as: $$ \mathbf{A} \cdot \mathbf{B} = a_xb_x + a_yb_y + a_zb_z $$ these properties are fullfilled. Note that $ a_xb_x + a_yb_y + a_zb_z $ is ascalar and not a vector anymore, because you are summing up products between scalar quantities (i.e. the components of your vectors).
Now consider the dot product between the vector $ \mathbf{A}= a_x \mathbf{i} + a_y \mathbf{j} + a_z \mathbf{k} $ and the vector $ \mathbf{i} $, using the formula above, you get: $$ \mathbf{A} \cdot \mathbf{i} = a_x = \mid \mathbf{A} \mid cos\theta $$ where $\theta$ is the angle between $ \mathbf{A} $ and $ \mathbf{i} $, i.e. $ \mathbf{A} \cdot \mathbf{i}$ gives you the projection of $ \mathbf{A} $ on $\mathbf{i} $ (try to sketch the vectors in 2D). So, in a general way, you have that $ \mathbf{A} \cdot \mathbf{B} $ gives you the projection of $\mathbf{A} $ on $\mathbf{B}$, i.e $ \mid \mathbf{A} \mid \mid \mathbf{B} \mid cos\theta $.