Solution (source code)

= Solution

For an invertible $A$, factor $\det(A+tB)=\det A\det(I+tA^{-1}B)$. The <determinant>'s permutation expansion gives $\det(I+tC)=1+t\operatorname{tr}C+O(t^2)$. Differentiating at zero yields
$$
\boxed{(d\det)_A(B)=\det A\,\operatorname{tr}(A^{-1}B).}
$$
At a determinant-one matrix choose $B=A/n$; the derivative is one. Thus one is a <regular value> of the smooth <determinant> map on $GL(n)$. The <regular level set theorem> makes $SL(n)$ a <submanifold> of <codimension of a submanifold> one, with
$$
\boxed{\dim SL(n)=n^2-1.}
$$
This includes $n=1$, when $SL(1)=\{1\}$ has dimension zero.