def dotProduct(v1, v2):
    """Sum product for the components of v1 and v2. v1 and v2 should have 
    same dimensions."""
    if (len(v1) != len(v2)):
        return None
    return sum(a * b for a,b in zip(v1, v2))