= | b | * ab/(| a | | b |)= ab/| a | = 12/3 = 4
2. Projection length = acos
In fact, the projection length is negative, because it may be on its extension line, or it may be negative from the perspective of cos.
I hope I can help you, thank you!