<p>All you need for this particular question is the following. Let $\mathbf{X}$ be a $T \times K$ matrix, $\mathbf{w}$ a K-dimensional vector and $\mathbf{y}$ a T-dimensional vector, then</p>

<p>$$
\begin{eqnarray*}
\frac{\partial \mathbf{w}^{\prime}\mathbf{X}^{\prime}\mathbf{y}}{\partial \mathbf{w}}&amp;=&amp;
\mathbf{X}^{\prime}\mathbf{y}\\
\frac{\partial \mathbf{w}^{\prime}\mathbf{X}^{\prime}\mathbf{X}\mathbf{w}}{\partial\mathbf{w}}&amp;=&amp;2\mathbf{X}^{\prime}\mathbf{X}\mathbf{w}
\end{eqnarray*}
$$
Back to your original post, we will first rewrite it in order to apply the rules provided. The first element in the expression we want to differentiate is the same as $\phi'(\mu-R_f\mathbf{1})$, hence
$$
\frac{\partial \phi'(\mu-R_f\mathbf{1})-1/2\alpha\phi'\Sigma\phi}{\partial \phi}=
(\mu-R_f\mathbf{1})-\alpha\Sigma\phi
$$
and equating to 0 you get the desired result.</p>

CC BY-SA 3.0
2015-02-26T04:26:55.557Z
2015-02-26T13:10:20.000Z
2015-02-26T13:10:20.000Z
MauOlivares
<p>Can someone help explain the passage <a href="https://i.sstatic.net/DdRvP.jpg" rel="nofollow noreferrer">here</a>? I'm rusty with my linear algebra so the derivate of these transpose matrices isn't making any sense to me. A detailed explanation would be very much appreciated. What happens to the 1/2, and that whole second term in general?</p>

<asset-pricing><optimization><portfolio-theory>
Derivative of CARA utility
user2034
# Derivative of CARA utility

(Asked by: username_0 on 2015-02-26)

Can someone help explain the passage [here](https://i.sstatic.net/DdRvP.jpg)? I'm rusty with my linear algebra so the derivate of these transpose matrices isn't making any sense to me. A detailed explanation would be very much appreciated. What happens to the 1/2, and that whole second term in general?

**Tags:** asset-pricing, optimization, portfolio-theory


---

## 1 answers

### Answer by username_1 on 2015-02-26. Score: 5 | Accepted answer

All you need for this particular question is the following. Let $\mathbf{X}$ be a $T \times K$ matrix, $\mathbf{w}$ a K-dimensional vector and $\mathbf{y}$ a T-dimensional vector, then

$$
\begin{eqnarray\*}
\frac{\partial \mathbf{w}^{\prime}\mathbf{X}^{\prime}\mathbf{y}}{\partial \mathbf{w}}&=&
\mathbf{X}^{\prime}\mathbf{y}\\
\frac{\partial \mathbf{w}^{\prime}\mathbf{X}^{\prime}\mathbf{X}\mathbf{w}}{\partial\mathbf{w}}&=&2\mathbf{X}^{\prime}\mathbf{X}\mathbf{w}
\end{eqnarray\*}
$$
Back to your original post, we will first rewrite it in order to apply the rules provided. The first element in the expression we want to differentiate is the same as $\phi'(\mu-R\_f\mathbf{1})$, hence
$$
\frac{\partial \phi'(\mu-R\_f\mathbf{1})-1/2\alpha\phi'\Sigma\phi}{\partial \phi}=
(\mu-R\_f\mathbf{1})-\alpha\Sigma\phi
$$
and equating to 0 you get the desired result.


---

