QR decomposition of smooth function I need some help on this problem. Suppose $A(t)$ is a smooth family of $n\times n$ real matrices with $A(0)=I$ and write $A'(t)$ as derivative of $A$. 
(a) For each $t$, write, $A(t)=Q(t)R(t)$ where $Q$ is an orthogonal matrix and $R$ is upper triangular. Suppose that $Q(0)=I$ and $Q(t)$ is a continuous function of $t$. Show that $Q(t)$ and $R(t)$  are smooth functions of $t$ if $\det(A(t))\neq 0$ for all $t$. 
(b) Find an example with $det(A(t))=0$ for some $t$ showing that $Q(t)$ need not be unique or smooth. 
(c) Determine an algorithm that involves $O(n^2)$ that computes $Q'(0)$ and $R'(0)$ from $A'(0)$
I m not that familiar with QR decomposition, so any ideas on how to start (a)
 A: Global solution
After I have read the answer/hint of @user1551, there is a better solution using the uniqueness of the Cholesky decomposition. As long as you need not establish the existence of $Q(t)$ and $R(t)$.
I will drop the argument $(t)$ in the following.
Since $Q$ is continuous, $R = Q^T A$ is also continuous. Thus, the diagonal entries of $R$ change their signs if and only if some of them become $0$ for some $t_0$. That implies $A(t_0)$ is singular, which contradicts the assumption on $A$. Hence, the diagonal entries of $R$ do not change signs. From $R(0) = Q(0)^T A(0) = I$ follows, the diagonal entries of $R$ are positive.
Now, $A^T A$ is positive definite and from $A = QR$ follows
$$ A^T A = R^T Q^T Q R = R^T R. $$
Thus, $R$ is the unique Cholesky factor of $A^T A$, which depends smoothly on $A^T A$.
Thus, $R$ and $Q = AR^{-1}$ are both smooth.
Local solution in a neighborhood of $t=0$!
Denote the set of $n\times n$ real matrices by $M_n$.
Let $GL_n\subset M_n$ be the subset of non-singular matrices, which is open,
$U_n\subset M_n$ be the subspace of upper triangular matrices, and
$S_n\subset M_n$ be the subspace of symmetric matrices.
Consider $F: GL_n \times (GL_n\cap U_n) \times GL_n \to S_n \times M_n$ defined by
$$ F(Q, R, A) = \begin{bmatrix} Q^T Q - I \\ QR - A \end{bmatrix}. $$
Notice that the $QR$ decomposition $A(t) = Q(t)R(t)$ satisfies $F(Q(t), R(t), A(t)) = 0$ for every $t$.
Also, $F$ is smooth. 
So, we only need to show, that the partial differential $D_{(Q,R)} F$ is injective.
Let $Q,R,A\in GL_n$ with $R\in U_n$ and let $H\in M_n, K\in U_n$.
Then, we have
$$ D_{(Q,R)} F(Q, R, A)[H,K] = \begin{bmatrix} H^T Q + Q^T H & \\ HR + Q K \end{bmatrix}. $$
So consider
$$ D_{(Q,R)} F(Q(0), R(0), A(0))[H,K] = \begin{bmatrix} H^T I + I H & \\ HI + I K \end{bmatrix} = \begin{bmatrix} H^T + H & \\ H + K \end{bmatrix} = 0. $$
The first row implies that $H$ is skew-symmetric. The second row implies, that the strict lower triangular half of $H$ is zero, as $K$ is upper triangular. Thus, $H=K=0$.
Hence, $D_{(Q,R)} F(Q(0), R(0), A(0))$ is injective and the implicit function theorem applies near $(Q(0), R(0), A(0))$.
(a) By implicit function theorem, $Q(t)$ and $R(t)$ depends smoothly on $A(t)$, which again is smooth in $t$.
(b) Take $A=0$ and take $Q$ and $R$ as you like.
(c) Notice that
\begin{align} 
0 &= D_Q F(Q(t), R(t), A(t)) Q'(t) \\
&+ D_R F(Q(t), R(t), A(t)) R'(t) \\
&+ D_A F(Q(t), R(t), A(t)) A'(t).
\end{align}
A: Hint. Solve $R^TR=A^TA$ entrywise. Hence show that $R$ is smooth. Consequently, $Q=AR^{-1}$ is smooth too.
