For convenience, let vectors P and Q be as shown on the graph. (P is horizontal.)

Draw the altitude from vector P to the terminal point (c, d) of Q.

Simple trigonometry gives us:
cos θ = c / | Q |, so
c = | Q | cos θ
and
sin θ = d / | Q |, so
d = | Q | sin θ
Since P is horizontal,
a = | P |
b = 0
So
ac + bd
= a | Q | cos θ + 0
= | P | | Q | cos θ
Therefore
P • Q = | P | | Q | cos θ = ac + bd
This result can be generalized for P and Q in any orientation.