TITLE: Determinant of a $2\times 2$ block matrix
QUESTION [11 upvotes]: I would like to know the proof for:

The determinant of the block matrix
$$\begin{pmatrix} A & B\\ C& D\end{pmatrix}$$
equals
$$(D-1) \det(A) + \det(A-BC) = (D+1) \det(A) - \det(A+BC)$$
when $A$ is a square matrix, $D$ is a scalar, $C$ is a row vector and $B$ is a column vector.

I appreciate your help.

REPLY [2 votes]: Let
$$\mathrm M := \begin{bmatrix} \mathrm A & \mathrm c\\ \mathrm r^\top & \alpha\end{bmatrix}$$
where $\mathrm A \in \mathbb R^{n \times n}$ and $\mathrm c, \mathrm r \in \mathbb R^n$. Assuming that $\mathrm A$ is invertible,
$$\underbrace{\begin{bmatrix} \mathrm I_n & 0_n\\ -\mathrm r^\top \mathrm A^{-1} & 1\end{bmatrix}}_{\det (\cdot) = 1} \begin{bmatrix} \mathrm A & \mathrm c\\ \mathrm r^\top & \alpha\end{bmatrix} = \begin{bmatrix} \mathrm A & \mathrm c\\ 0_n^\top & \alpha - \mathrm r^\top \mathrm A^{-1} \mathrm c\end{bmatrix}$$
Hence,
$$\begin{array}{rl} \det (\mathrm M) &= \det \begin{bmatrix} \mathrm A & \mathrm c\\ 0_n^\top & \alpha - \mathrm r^\top \mathrm A^{-1} \mathrm c\end{bmatrix}\\\\ &= \det (\mathrm A) \cdot (\alpha - \mathrm r^\top \mathrm A^{-1} \mathrm c)\\\\ &= (\alpha - 1) \cdot \det (\mathrm A) + \det (\mathrm A) \cdot (1 - \mathrm r^\top \mathrm A^{-1} \mathrm c)\\\\ &= (\alpha - 1) \cdot \det (\mathrm A) + \det (\mathrm A) \cdot \det(\mathrm I_n - \mathrm A^{-1} \mathrm c \mathrm r^\top)\\\\ &= (\alpha - 1) \cdot \det (\mathrm A) + \det(\mathrm A - \mathrm c \mathrm r^\top)\end{array}$$
where we used the Weinstein-Aronszajn determinant identity to conclude that
$$1 - \mathrm r^\top \mathrm A^{-1} \mathrm c = \det(\mathrm I_n - \mathrm A^{-1} \mathrm c \mathrm r^\top)$$