Add n-dimensional vector and matrix.