\documentclass[a4paper,12pt]{article}
\usepackage{epsfig}
\newcommand{\ds}{\displaystyle}
\setlength{\textwidth}{6.5in} \setlength{\textheight}{9in}
\setlength{\topmargin}{-.25in} \setlength{\oddsidemargin}{-.25in}
\newcommand\br{\textbf{R}}
\pagestyle{empty}
\begin{document}

\parindent=0pt

\bf{Question}

\quad Let $Q:\br^n\to\br$ be a quadratic form given by
$Q(x)=x^TAx$ where $A$ is an $n\times n$ symmetric matrix.  Show
from the definition of differentiation that its derivative at the
point $x\in\br^n$ is the $1\times n$ matrix $2x^TA$.  What does
this amount to when $n=1\,$?
\smallskip
Let $M_n$ denote the space of $n\times n$ (real) matrices, which
can be thought of as $\br^{n^2}$.  Let $f:M_n\to M_n$ be the
function given by $$f(A)=\trace(A^TA).$$ Show from the definition
that $df(A)H=2\trace(A^TH)$ for every $H\in M_n$.  What does this
amount to when $n=1\,$ ?



\bf{Answer}

\begin{eqnarray*}
Q(x) & = & x^TAx\\ Q(x+h) & = & (x+h)^T A (x+h)\\ & = & x^TAx +
h^TAx + x^T A h + h^TAh\\ & = & Q(x) +
\underbrace{2x^TAh}_{\textrm{linear in }h} +
\underbrace{h^TAh}_{\textrm{quadratic}}\\ \textrm{as }
\underbrace{h^tAx = x^TA^Th}_{\textrm{scalar}} & = &x^TAh
\end{eqnarray*}

So we read off the linear term to see $dQ(x)h = 2x^TAh$.

When $n=1$ this simply says $\frac{d}{dx}(ax^2)=2ax$.

\begin{eqnarray*}
f(A) & = & \textrm{trace}(A^TA)\\ f(A+H) & = &
\textrm{trace}(A+H)^T(A+H)\\ & = &  \textrm{trace}(A^TA) +
\textrm{trace}(H^TA) + \textrm{trace}(A^TH) +
\textrm{trace}(H^TH)\\ & = & f(A) + \underbrace{2
\textrm{trace}(A^TH)}_{\textrm{linear in }H} + \underbrace{
\textrm{trace}(H^TH)}_{\textrm{quadratic}}
\end{eqnarray*}

So we read of the linear to see $df(A)H=2 \textrm{trace}(A^TH)$.

When $n=1$ this says $\frac{d}{da}(a^2)=2a$.



\end{document}
