1
$\begingroup$

I want to solve the derivative of $\mathbf{f}=\mathbf{a}^T\mathbf{x}\mathbf{c}^T$ with respect to $\mathbf{x}$, where $\mathbf{a}$ and $\mathbf{x}$ are $M\times 1$ vectors, and $\mathbf{c}$ is a $N \times 1$ vector. $\mathbf{a}$ and $\mathbf{c}$ are independent of $\mathbf{x}$. I tried the following procedure: $$ \partial\mathbf{f} = \mathbf{a}^T\partial\mathbf{x}\mathbf{c}^T=\mathbf{c}^T\mathbf{a}^T\partial\mathbf{x} $$ But I cannot directly get $\frac{\partial\mathbf{f}}{\partial\mathbf{x}}$. Could someone please help me with this derivative? Thanks.

$\endgroup$
6
  • $\begingroup$ What is the context? What are the sizes of the vectors? And, are $\mathbf a$ and $\mathbf c$ constant vectors or do they depend on $\mathbf x$ ? Without further context and some details on your attempts towards a solution, your question is phrased as an isolated question and is unlikely to get an answer here. $\endgroup$ Jul 8, 2022 at 6:00
  • $\begingroup$ In general, the equality $$\mathbf{a}^T\partial\mathbf{x}\mathbf{c}^T=\mathbf{c}^T\mathbf{a}^T\partial\mathbf{x}$$ does not hold unless the matrices commute. $\endgroup$ Jul 8, 2022 at 6:01
  • 1
    $\begingroup$ @sadman-ncc, Thanks, I have edited it. Now, the equality $\mathbf{a}^T\partial\mathbf{x}\mathbf{c}^T=\mathbf{c}^T\mathbf{a}^T\partial\mathbf{x}$ holds, because $\mathbf{a}^T\partial\mathbf{x}$ is a scalar. $\endgroup$
    – ZYX
    Jul 8, 2022 at 6:09
  • $\begingroup$ You can use this online tool to compute derivatives of scalars/vectors/matrices. It's really great to do actual computations. $\endgroup$
    – PC1
    Jul 8, 2022 at 6:18
  • $\begingroup$ @PC1.Thanks! But I found the results of $\frac{\partial\mathbf{a}^T\mathbf{x}\mathbf{c}^T}{\partial\mathbf{x}}$ and $\frac{\partial\mathbf{a}^T\mathbf{x}\mathbf{c}}{\partial\mathbf{x}}$ are the same, but I do not know the procedure. $\endgroup$
    – ZYX
    Jul 8, 2022 at 6:26

0

You must log in to answer this question.

Browse other questions tagged .