Practical Linear Algebra: A Geometry Toolbox, Third edition
Gerald Farin & Dianne Hansford
CRC Press, Taylor & Francis Group, An A K Peters Book, 2013

Dot Product

Two vectors a=(({{v}, {w}})) and b=(({{x}, {y}})) define a dot product:

	ab=a.b=vx + wy.

If a.b=0, then a and b are perpendicular (also:orthogonal), i.e., they form a right angle.

In the following cell, b is changed in the Manipulate command (red), and a is given as fixed input (black). The dot product is displayed in a box.

(* fixed vector -- in black  *)
a2 = {2,1}; 

(* graphics for a2 *)
arrowa2={Thick,Arrowheads[Large],Arrow[{{0,0},a2}]};
arrowplot2=Graphics[arrowa2];

Manipulate[
b2={s,t};  (*in red *)
arrowb2={Thick,Arrowheads[Large],Arrow[{{0,0},b2}]};

Graphics[{arrowa2,Red,arrowb2},PlotLabel->Style[Framed[a2.b2],20],Axes->True,PlotRange->{{-2,2},{-1,1}}],

{{s,0.5},-1,2},{{t,0.5},-1,1},
FrameLabel->{" "," ","Dot product: black.red"," "}]