A vector function of a vector argument is a function that takes a vector as input and produces a vector as output. The derivative of a vector function with respect to a vector is a matrix, often called the Jacobian matrix. For a vector function $\mathbf{f}(\mathbf{x})$ where $\mathbf{x} = [x_1, x_2, …, x_n]^T$ and $\mathbf{f} = [f_1, f_2, …, f_m]^T$, the Jacobian matrix is given by:
$$J(\mathbf{f}) = \begin{bmatrix} \frac{\partial f_1}{\partial x_1} & \cdots & \frac{\partial f_1}{\partial x_n} \ \vdots & \ddots & \vdots \ \frac{\partial f_m}{\partial x_1} & \cdots & \frac{\partial f_m}{\partial x_n} \end{bmatrix}$$
def vector_function(v):
return np.array([v[0]**2, v[1]**3, v[2]**4])
v = np.array([1, 2, 3])
print(f"f({v}) = {vector_function(v)}")