# Showing a function $f \colon \mathbb{R}^{d \times d} \times \mathbb{R}^d \to \mathbb{R}$ is in $C^1$.

I have a function $$f \colon \mathbb{R}^{d \times d} \times \mathbb{R}^d \to \mathbb{R}$$ defined by $$f(A, c) = (z - c)^T A (z - c) - 1$$ where $$A \in \mathbb{R}^{d \times d}$$ is symmetric positive definite, $$c \in \mathbb{R}^d$$, and $$z_i \in \mathbb{R}^d$$ is a given constant. This function is used in defining an optimization problem, and so it is of interest to find wether or not this function is in $$C^1$$ and $$C^2$$. I know that for simpler functions, i.e. 1-dimensional functions $$g \colon \mathbb{R} \to \mathbb{R}$$, this simply involves showing that the function is once and twice differentiable. However, this problem has me confused. How would I even go about computing the gradient of a function like this?

All help is appreciated. If anything is unclear or further clarification is needed, please let me know.

• If we're restricting $A$ to be symmetric and positive definite, then the domain of $f$ is not $\Bbb R^{d\times d}\times \Bbb R^d$. – Arthur Mar 11 at 17:04
• You are of course correct. Is there a standard notation for the set of symmetric and positive definite matrices? I also don't think the restriction on A is of relevance for the question, so I could remove it if this makes the question more clear. – Erik André Mar 11 at 17:30
• Your function is a polynomial (in $d^2+d$ variables). All partial derivatives of $f$ (of any order) are also polynomials and in particular continuous. The function $f$ is thus of class $C^\infty$. – Amitai Yuval Mar 11 at 18:43