'Dot product of two vectors.
Returns a scalar, the dot product of the two Vectors
Parameters
other : Vector
The Vector which we are dotting with
Examples
>>> from sympy.physics.vector import ReferenceFrame, dot
>>> from sympy import symbols
>>> q1 = symbols(\'q1\')
>>> N = ReferenceFrame(\'N\')
>>> dot(N.x, N.x)
1
>>> dot(N.x, N.y)
0
>>> A = N.orientnew(\'A\', \'Axis\', [q1, N.x])
>>> dot(N.y, A.y)
cos(q1)'

def __and__(self, other):

    from sympy.physics.vector.dyadic import Dyadic
    if isinstance(other, Dyadic):
        return NotImplemented
    other = _check_vector(other)
    out = S(0)
    for (i, v1) in enumerate(self.args):
        for (j, v2) in enumerate(other.args):
            out += ((v2[0].T * v2[1].dcm(v1[1])) * v1[0])[0]
    if Vector.simp:
        return trigsimp(sympify(out), recursive=True)
    else:
        return sympify(out)
