I am trying to solve a problem regarding the scalar product. The problem has multiple choices, and I solved it in two different ways, and got different values. Both of the values were a choice, but only one of them is right, and I don't understand why.
Here is the problem:
Firstly, I have this image along with the following info:
- $[AB]$ is a diameter of the circumference of center $O$
- The radius value is 2
- The triangle $[AOP]$ is a right triangle
And then, I am asked the value of $ \vec {AP} \cdot \vec {AB} $.
Those are my two answers:
Answer 1:
$ \overline {AO} = 2 \\ \overline {OP} = 2 $
$ \overline {AP}^2 = \overline {AO}^2 + \overline {OP}^2 \\ \overline {AP}^2 = 2^2 + 2^2 \\ \overline {AP} = \sqrt {8}, \overline {AP} > 0 \\ \overline {AP} = 2 \sqrt 2 $
Since $O$ is the orthogonal projection from $P$ in $ \overline {AB} $,
$\vec {AP} \cdot \vec {AB} = \vec {AP} \times \vec {AO} = 2 \sqrt 2 \times 2 = 4 \sqrt 2 $
Answer 2:
$ \newcommand{\sininv}{\sin^{-1}} \sin \alpha = \frac {\overline {OP}} {\overline {AP}} = \frac 2 {2 \sqrt 2} = \frac {\sqrt 2} 2 \\ \alpha = \sininv (\frac {\sqrt 2} 2) = 45º $
$ \vec {AP} \cdot \vec {AB} = \overline {AP} \times \overline {AB} \times \cos 45º = \frac {8 \sqrt 2 \times \sqrt 2} 2 = 4 \times 2 = 8 $
The right answer is the second one. Why can't I use the first one to solve the problem?
I would appreciate any help.

The error is in the equation $\vec {AP} \cdot \vec {AB} = \vec {AP} \times \vec {AO}$, but your approach in answer 1 is just as good as in answer 2. Take a look at the following visual of vector projection (labeled corresponding to your image):
From this visual we see that the formula for the magnitude of the projection should be: $$ \overline{AB} = 2\overline{AO} = 2\frac{\vec{AP} \cdot \vec{AO}}{\overline{AO}} = \frac{\vec{AP} \cdot (2\vec{AO})}{\overline{AO}} = \frac{\vec{AP} \cdot \vec{AB}}{\overline{AO}}$$ Implying that: $$\vec{AP} \cdot \vec{AB} = \overline{AB} \times \overline{AO} = 4 \times 2 = 8$$