Determinant of matrices along a line between two given matrices The question, with no simplifications or motivation:

Let $A$ and $B$ be square matrices of the same size (with real or complex coefficients). What is the most reasonable formula one can find for the determinant $$\det((1-t)A + tB)$$ as a function of $t \in [0,1]$? If no reasonable formula exists, what can we say about these determinants?

So we're taking a line between two matrices $A$ and $B$, and computing the determinant along this line. When $A$ and $B$ are diagonal, say $$A = \operatorname{diag}(a_1,\ldots,a_n), B = \operatorname{diag}(b_1,\ldots,b_n),$$ then we can compute this directly:
$$\begin{aligned}
\det((1-t)A + tB) &= \det \operatorname{diag}((1-t)a_1 + tb_1, \ldots, (1-t)a_n + tb_n) \\
&= \prod_{j=1}^n ((1-t)a_j + tb_j).
\end{aligned}$$
I'm not sure if this can be further simplified, but I'm sure someone can push things at least a tiny bit further than I have.
I'm most curious about the case where $A = I$ and each $(1-t)A + tB$ is assumed to be invertible. Here's what I know in this case: writing
$$D(t) = \det((1-t)I - tB),$$
we can compute that
$$ \dot{D}(t) = D(t) c(t)$$
where
$$c(t) := \operatorname{trace}(((1-t)I + tB)^{-1}(B-I))$$
(a warning: I am not 100% sure this formula holds). Thus we can write
$$D(t) = \exp\left(\int_0^t c(\tau) \; d\tau\right)$$
since $D(0) = 1$.
I have no idea how to deal with the function $c(\tau)$ though. Any tips?

I think I have an answer to the last case I mentioned ($A=I$, all $(1-t)I + tB$ invertible). The key is to write
$$\begin{aligned}
\int_0^t c(\tau) \; d\tau &= \operatorname{trace} \int_0^t ((1-\tau)I + \tau B)^{-1} (B-I) \; d\tau \\
&= \operatorname{trace} \log ((1-t)I + tB)
\end{aligned}
$$
using that $\frac{d}{dt}((1-t)I + tB) = B-I$ and $\frac{d}{dt}\log(A(t)) = A(t)^{-1} \frac{d}{dt} A'(t)$ (I think this is true!). Taking matrix logarithms here should be ok, since everything in sight is invertible. Then
$$
D(t) = e^{\operatorname{trace} \log((1-t)I + tB)}.
$$
Of course, this leaves one with the problem of computing a matrix logarithm, but in the case where $B$ is diagonal, this reduces to the first formula in my question. This could probably be generalised to the case of general invertible $A$ by computing $\dot{D}(t)$ as before. I'll do this tomorrow and make an edit with the results (or you can do it!)
