# Basic Vector Calculus Problem

This is a basic calculs/pre-calcuus question, that am having trouble with. For real matrices $A_{n \times n}$,$X_{n \times n}$ and $K_{n \times n}$ and a vector $c_{n \times 1}$, I want to have the derivative of the below function w.r.t the vector $c$ in a vector/matrix notation and not in terms of the individual entries of $c$. i.e the derivative w.r.t $c$ and not the derivative w.r.t each entry $c_i$. Note that $x_{i \mathbb{.}}$ denotes the row $i$ of $X$. I'd like to see a few steps in reasonable detail if you are re-arranging the below function in matrix notation! I also would like to have the second derivative w.r.t $c$.

The function is : $\sum_{i,j}A_{i,j}\left[\sum_{q=1}^nc_qK(x_{i\mathbb{.}},x_{q\mathbb{.}})-\sum_{l=1}^nc_lK(x_{j\mathbb{.}},x_{l\mathbb{.}})\right]^2$

-
Maybe if you write the expression in matricial form, it will be easier to work with. – Pragabhava Oct 24 '12 at 3:01
Did you mean to write $\sum_{q=1}^n$ and $\sum_{\ell=1}^n$? – littleO Oct 24 '12 at 3:26
@littleO Yes! That is right.Edited and awaiting an answer. – qlinck Oct 24 '12 at 3:30
@Pragabhava If I could represent this in a matrix form- I would not have posted this question. That is the reason-the differentiation seemed harder, to do in this form and get an answer in vector/matrix form – qlinck Oct 24 '12 at 3:32
For clarification, what does $K(x_i, x_q)$ represent, exactly? – Muphrid Oct 24 '12 at 5:16