How do I derive this matrix expression? Let $A$ be a $3 \times 4$ homogeneous matrix and $\vec{C}'$ be a $4 \times 1$ homogeneous vector (projective $P^3$ space). Then let $\vec{e} = A \vec{C}'$ and define each row of $A$ as $\vec{a}^i$ such that each element of $\vec{e}$ can be defined as $e^i=\vec{a}^i\vec{C}'$. Also, let $B$ be some other $3 \times 4$ homogeneous matrix with rank 3 such that $B\vec{C}'=\vec{0}$. Show that:
$$ e^i = det\begin{bmatrix}\vec{a}^i \\ B \end{bmatrix}$$
In the textbook, it says this formula can be obtained by expanding the determinant by cofactors along the first row but I am confused about which matrix this is referring to.
For anyone interested, this is from page 413 Multiple View Geometry. $\vec{C}'$ is the centre of the second camera. $A$ and $B$ are the camera projection matrices of the first and second camera. $\vec{e}$ is the epipole in the first image. Though I don't think this information is necessary for this derivation as it seems to be purely a linear algebra problem. I am stuck and am not sure how this is derived.
 A: Let me build some geometric intuition around this. For the moment I view row vectors as planes, column vectors as points. So $B\vec C'=\vec 0$ can be read as three separate equations of row times column, plane times point. They characterize $C'$ as the intersection of three planes, namely the rows of $B$. Since $\operatorname{rank}(B)=3$ these will be distinct planes, so $C'$ as a homogeneous point (i.e. linear equivalence class) is uniquely identified by this. The right kernel of $B$ has dimension $1$.
When will some different plane (row vector) $\vec s$ coincide with $\vec C'$? There are two ways for expressing this. On the one hand you can say that's the case when the matrix product (or vector dot product, same thing) is zero, i.e. when $\vec s\cdot\vec C'=0$. On the other hand you can look at the three planes defining $\vec C'$ and say that a plane passes through that point if it has a point in common with those three planes. Four planes have at least a point in common iff their determinant is zero, i.e. $\det\begin{bmatrix}\vec s\\ B\end{bmatrix}=0$. Your book might have established this already. If not then think of the point of intersection as a member of the right kernel of this matrix, as it needs to have dot product zero with each of the rows. That right kernel has non-zero dimension only if the determinant is zero. Now comes the determinant expansion.
\begin{align*}
\scriptsize\begin{vmatrix}
s_1&s_2&s_3&s_4\\
b_{1,1}&b_{1,2}&b_{1,3}&b_{1,4}\\
b_{2,1}&b_{2,2}&b_{2,3}&b_{2,4}\\
b_{3,1}&b_{3,2}&b_{3,3}&b_{3,4}
\end{vmatrix} &=\phantom+
s_1{\scriptsize\begin{vmatrix}
b_{1,2}&b_{1,3}&b_{1,4}\\
b_{2,2}&b_{2,3}&b_{2,4}\\
b_{3,2}&b_{3,3}&b_{3,4}
\end{vmatrix}} -
s_2{\scriptsize\begin{vmatrix}
b_{1,1}&b_{1,3}&b_{1,4}\\
b_{2,1}&b_{2,3}&b_{2,4}\\
b_{3,1}&b_{3,3}&b_{3,4}
\end{vmatrix}} \\&\phantom=+
s_3{\scriptsize\begin{vmatrix}
b_{1,1}&b_{1,2}&b_{1,4}\\
b_{2,1}&b_{2,2}&b_{2,4}\\
b_{3,1}&b_{3,2}&b_{3,4}
\end{vmatrix}} -
s_4{\scriptsize\begin{vmatrix}
b_{1,1}&b_{1,2}&b_{1,3}\\
b_{2,1}&b_{2,2}&b_{2,3}\\
b_{3,1}&b_{3,2}&b_{3,3}
\end{vmatrix}}=\vec s\cdot \vec b
\end{align*}
$$
\text{with }\vec b=\scriptsize\begin{bmatrix}
+\begin{vmatrix}
b_{1,2}&b_{1,3}&b_{1,4}\\
b_{2,2}&b_{2,3}&b_{2,4}\\
b_{3,2}&b_{3,3}&b_{3,4}
\end{vmatrix} \\[2ex]
-\begin{vmatrix}
b_{1,1}&b_{1,3}&b_{1,4}\\
b_{2,1}&b_{2,3}&b_{2,4}\\
b_{3,1}&b_{3,3}&b_{3,4}
\end{vmatrix} \\[2ex]
+\begin{vmatrix}
b_{1,1}&b_{1,2}&b_{1,4}\\
b_{2,1}&b_{2,2}&b_{2,4}\\
b_{3,1}&b_{3,2}&b_{3,4}
\end{vmatrix} \\[2ex]
-\begin{vmatrix}
b_{1,1}&b_{1,2}&b_{1,3}\\
b_{2,1}&b_{2,2}&b_{2,3}\\
b_{3,1}&b_{3,2}&b_{3,3}
\end{vmatrix}
\end{bmatrix}
$$
You have $\vec s\cdot\vec C'=0$ iff $\vec s\cdot\vec b=0$, so $\vec C'$ and $\vec b$ represent the same point. They are multiples of one another (and the scalar factor between them will in fact reflect in your final result).
$$\vec b=\lambda\vec C'$$
Now look at your determinant.
$$\det\begin{bmatrix}\vec a^i\\ B\end{bmatrix}=\vec a^i\cdot\vec b=\vec a^i\cdot(\lambda\vec C')=\lambda e^i$$
So yes, these four determinants compute the four matrix times vector products, up to a common factor.
