Derivatives of determinant function when the matrix variable is possibly singular The first derivative of the determinant function is well-known and is given by Jacobi formula: let $A(t)$ be a matrix function of scalar variable $t$, then
$$
{\rm d}~\text{det}(A(t))=\text{tr}\Big(\text{adj}(A(t)) ~{\rm d}A(t)\Big).
$$
I did a lot of research, but I couldn't find a good source on studying second derivative of $\text{det}(\cdot)$ function when $A(t)$ is singular. (However, there are pretty standard derivations with assumption $A$ being invertible.)
So my question is that "how to calculate $\frac{{\rm d}^2 \text{det}~(A(t))}{{\rm d} t^2}$  when $A(t)$ is singular"?
I really appreciate any help/hint or even a reference. Thanks so much.
 A: The second derivative, you get:
$$d^2\mbox{det}(A(T)) = \mbox{tr}(R(t)dA(t)+R(t)d^2A),$$
where 
$$R(t):=d\mbox{adj}(A(t))=\frac{\Big(\mbox{tr}\left(\mbox{adj}(A)dA\right)\mathbf{I}-\mbox{adj}(A)dA\Big)\mbox{adj}(A)}{\mbox{det}(A)}.$$
Since $\mbox{adj}(A)$ is a polynomial in $A$'s elements, it must have a derivative regardless of whether or not $A$ is singular, even though $R(t)=0/0$ when $A$ is singular. I'm not sure if there's an explicit formula here, but you can otherwise take the limit of $A_n\rightarrow A$ where $A_n$ are a sequence of nonsingular matrices. 
A: Thanks Alex for your answer. However this is my effort (which quite matches yours). Let us assume $rank(A(\epsilon))\leq n-2$ ($n$ being the dimension of square matrix $A(\epsilon)$), then 
\begin{equation}
\begin{aligned}
\frac{d^2 \det(A(\epsilon))}{d\epsilon^2}=&\text{tr} \left(\text{adj}\left(A(\epsilon)\right)\frac{d^2A(\epsilon)}{d\epsilon^2}+\frac{d\text{adj}\left(A(\epsilon)\right)}{d\epsilon}\frac{dA(\epsilon)}{d\epsilon}\right)
\\
=&\text{tr} \left(\frac{d\text{adj}\left(A(\epsilon)\right)}{d\epsilon}\frac{dA(\epsilon)}{d\epsilon}\right)
\end{aligned}
\end{equation}
where the second equality holds since $rank(A(\epsilon))\leq n-2$ (thus $\text{adj}\left(A(\epsilon)\right)=0$). Now I have difficulty computing derivative of adjugate operator. By definition of adjugate operator and derivative of determinant, it is not difficult to compute it as below:
\begin{equation}
 \begin{aligned}
\left( \frac{d ~\text{adj}^T(A(\epsilon))}{d\epsilon}\right)_{i,j}=(-1)^{i+j}\text{tr}\left(\text{adj}\left(A_{-i,-j}(\epsilon)\right)\frac{d A_{-i,-j}(\epsilon)}{d\epsilon}\right)
 \end{aligned}
\end{equation}
where $-i,-j$ subscripts means removing row $i$ and column $j$. 
My question is how to make a explicit expression of it in terms of complete matrices $A(\epsilon)$, not its submatrices. I want a meaning out of it. Thank a lot.
