def dot_product(vector1, vector2):
    """
    Returns the dot product between two vectors. It can be
    used as a helper function to calculate the multiplication
    by two matrices.
    """
    result = 0
    for i in range(len(vector1)):
        result += vector1[i] * vector2[i]

    return result