Who first explicitly wrote the determinant identity $\det(1+AB) = \det(1+BA)$? Though this identity can be easily proved, I am wondering who first explicitly write it in such a simple and elegant form?
I check several textbooks on linear algebra but find no evidence (see below the list of books I have checked).
The entry on wikipedia calls it the Weinstein–Aronszajn identity now but previously attributed it to J. J. Sylvester.
In the blog of Terence Tao, he calls it the Weinstein–Aronszajn identity with a link to the Wikipedia page, but tags and comments for that article imply that he used to call it the 'Sylvester determinant identity'.
The wiki page does not give direct references to the explicit form.
The book referred to in the proof calls this identity 'Sylvester's determinant theorem'.
The old version of the wiki page refers to an 1851 paper by Sylvester.
I have checked it and did not see the explicit form.
In conclusion, no direct reference is given for the explicit form.
So I am very confused.
For the identity in the title, who should be attributed to?
In case that asking about attribution may offend some mathematicians, I would like to focus on who first use the finite/infinite version of this identity to solve problems, especially in the explicit form.
A direct reference would be a good answer.
By 'direct reference' I mean a paper — a paper which (1) contains the explicit form of the identity, (2) applies it to solve problems and (3) is authored by whoever presumably be attributed to.

Textbooks I have checked:

*

*C.D. Meyer, Matrix Analysis and Applied Linear Algebra (2000)

*R.A. Horn & C.R. Johnson, Matrix Analysis, 2nd ed. (2012)

 A: This is known as "Sylvester's determinant theorem". I don't know who first stated it as an explicit theorem, but the theorem's name originated from the stronger theorem that if $A$ and $B$ are square matrices, then $AB$ and $BA$ have the same eigenvalues and characteristic polynomials, i.e. $\det(xI-AB)=\det(xI-BA)$. When $A$ and $B$ are square matrices, the identity $\det(I+AB)=\det(I+BA)$ clearly follows from the stronger theorem. When the matrices are not square, one can pad them with zeroes to make them square.
Apparently Sylvester was the first person to state this stronger theorem. In an 1883 paper, he wrote:

The latent roots of the product of two matrices, it may be added, are the same in whichever order the factors be taken.

(Sylvester, J. J., On the equation to the secular inequalities in the planetary theory. Philosophical Magazine, 16:267-269, 1883. Reprinted in The Collected Mathematical Papers of James Joseph Sylvester, vol. IV (1882-1897). Chelsea, New York, 1973. ISBN 0-8284-02531.)
Both MacDuffee (1933) and Mirsky (1955) attributed this stronger theorem to Sylvester.  However, Sylvester did not prove the theorem in his paper. A proof (for complex matrices, I believe) was given by Thurston in 1931. Turnbull and Aitken gave another proof in 1932.
As you may already know, there is another "Sylvester's determinant identity" that is about a very different statement. While it is a bit confusing to have two theorems bearing very similar names, I think Wikipedia's renaming of Sylvester's determinant theorem to Weinstein–Aronszajn identity is ridiculous.
