Thread: Differentiation with matricies and vectors

1. Differentiation with matricies and vectors

Okay, so I've never seen a question like this before no similar examples in my notes or from past assignments or anything, so I'm literally stumped. The question goes...

Let $\displaystyle f$ be the function defined by

$\displaystyle f(x,y)=\alpha+(v_1, v_2)$ $\displaystyle \left( \begin{array}{c} x \\ y \end{array} \right)$ $\displaystyle +(x,y)\left( \begin{array}{cc} a & b \\ b & d \end{array} \right) \left( \begin{array}{c} x \\ y \end{array} \right)$

where $\displaystyle \alpha, v_1, v_2, a, b, d$ are all real numbers.

a) Compute $\displaystyle \frac{\partial f}{\partial x}$ and $\displaystyle \frac{\partial f}{\partial y}$.
For what values $\displaystyle v_1$ and $\displaystyle v_2$ is $\displaystyle (0,0)$ a critical point of $\displaystyle f$?

b) Compute $\displaystyle \frac{\partial^2f}{\partial x^2}, \frac{\partial^2f}{\partial x\partial y}, \frac{\partial^2f}{\partial y^2}$
For what values of $\displaystyle v_1, v_2, a, b, d$ is $\displaystyle (0,0)$ a saddle point of $\displaystyle f$?

2. Originally Posted by chella182
Let $\displaystyle f$ be the function defined by

$\displaystyle f(x,y)=\alpha+(v_1, v_2)$ $\displaystyle \left( \begin{array}{c} x \\ y \end{array} \right)$ $\displaystyle +(x,y)\left( \begin{array}{cc} a & b \\ b & d \end{array} \right) \left( \begin{array}{c} x \\ y \end{array} \right)$

where $\displaystyle \alpha, v_1, v_2, a, b, d$ are all real numbers.
This is not as scary as it looks. Just multiply out the matrix products and you'll see that f(x,y) is a scalar-valued function, $\displaystyle f(x,y) = \alpha + v_1x + v_2y + ax^2+2bxy + dy^2$.

Easy, isn't it?

3. Might be easy for you

But yeah, is the answer to the first one $\displaystyle v_1=0$ and $\displaystyle v_2=0$? And how do I know if it's a saddle point?

4. Originally Posted by chella182
is the answer to the first one $\displaystyle v_1=0$ and $\displaystyle v_2=0$?
Yes.

Originally Posted by chella182
And how do I know if it's a saddle point?
Second partial derivative test - Wikipedia, the free encyclopedia

5. Thankss! Think I'm beginning to get the hang of this now.

6. In case these problems become more complex in the case that writing them out is not very efficient, note that you can still use your old rules of differentiation with matrices and vectors, but since matrices and vectors are not necessarily commutative, you have to remember the order of multiplication. That is if you have Ax + xA, it is not okay to write that it is 2Ax.
In respect to your original question, lets look at the product of three matrices at the end:
$\displaystyle \frac{\partial}{\partial x}\left[(x,y)\left( \begin{array}{cc} a & b \\ b & d \end{array} \right) \left( \begin{array}{c} x \\ y \end{array} \right)\right]$
Applying the product rule, we get:
$\displaystyle \frac{\partial}{\partial x}((x, y))\left(\begin{array}{cc} a & b \\ b & d \end{array} \right) \left( \begin{array}{c} x \\ y \end{array} \right) + (x, y)\frac{\partial}{\partial x}\left(\left(\begin{array}{cc} a & b \\ b & d \end{array} \right) \left( \begin{array}{c} x \\ y \end{array} \right)\right)$
$\displaystyle = (1, 0)\left(\begin{array}{cc} a & b \\ b & d \end{array} \right) \left( \begin{array}{c} x \\ y \end{array} \right) + (x, y)\left(\frac{\partial}{\partial x}\left(\begin{array}{cc} a & b \\ b & d \end{array} \right)\left( \begin{array}{c} x \\ y \end{array} \right) + \left(\begin{array}{cc} a & b \\ b & d \end{array} \right)\frac{\partial}{\partial x}\left( \begin{array}{c} x \\ y \end{array} \right)\right)$
$\displaystyle = (a, b)\left( \begin{array}{c} x \\ y \end{array} \right) + (x, y)\left(0 + \left(\begin{array}{cc} a & b \\ b & d \end{array} \right)\left( \begin{array}{c} 1 \\ 0 \end{array} \right)\right)$
$\displaystyle = ax + by + (x, y)\left( \begin{array}{c} a \\ b \end{array} \right)\\ = 2(ax + by)$
The proof for this is just using vectors and matrices in place of numbers in the usually proofs of these properties; the complication is that the limits for vectors and matrices are more difficult to verify, as the vanishing component is also a vector/matrix.

7. Wow, that looks far too complex for what I need.

8. Most definitely. However, when used over time, the general laws make problems easier. Ie., one doesn't usually write all of that out on paper; one can jump immediately from the first line to the penultimate one. I only went through all the intermediate steps so you need to see how the normal laws of differentiation are being applied.

9. Oh yeah, I understand it, and I'm sure we'll probably be taught it when I get into 2nd year (if I ever get there!) but for this question I don't think my lecturer'd expect us to do that.