The dot product of two vectors can be defined either as $$\vec{A}\cdot\vec{B}=\left|\vec{A}\right|\left|\vec{B}\right|\cos \theta$$ or as, $$\vec{A}\cdot\vec{B}=A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}$$ I want to know how these two definitions are geometrically connected.
Mr. Sanderson made a video on this, dubbed “Dot products and duality”. However, that is too brief an explanation for me to get a grasp of what was explained. I'm just a high school student, and all of my understanding about linear algebra is merely based on Sal Khan and Grant Sandersons videos. I understand linear transformations (matrix-vector multiplications) and all the mathematical concepts used in the video, but I just don't get how this correlates these two definitions at the end. Thus what I'm asking for, is simply a lengthy explanation.
Also, what courses do I need to take to have a superb geometric understanding of these things? Do tell.