If both a and b have length one ( i.e. , they are unit vectors ) , their dot product simply gives the cosine of the angle between them . If both and have length one ( i.e. , they are unit vectors ) , their dot product simply gives the cosine of the angle between them .