I have a function $\varphi:\mathbb{R}\times S^{n-2}\subset\mathbb{R}^{n-1}\rightarrow\mathbb{R}^{n}, \varphi(t,\vec{\theta})$. Wanting to compute the determinant of the induced metric of the function, I wrote that
\begin{equation}g=(D\varphi)^{\intercal}(D\varphi)=\begin{bmatrix}\varphi_{t}^{\intercal}\\\varphi_{\vec{\theta}}^{\intercal}\end{bmatrix}\begin{bmatrix}\varphi_{t}&\varphi_{\vec{\theta}}\end{bmatrix}=\begin{bmatrix}\varphi_{t}^{\intercal}\varphi_{t} & \varphi_{t}^{\intercal}\varphi_{\vec{\theta}}\\\varphi_{\vec{\theta}}^{\intercal}\varphi_{t}&\varphi_{\vec{\theta}}^{\intercal}\varphi_{\vec{\theta}}\end{bmatrix}\end{equation} and \begin{equation}|g|=|\varphi_{t}^{\intercal}\varphi_{t}-(\varphi_{t}^{\intercal}\varphi_{\vec{\theta}})(\varphi_{\vec{\theta}}^{\intercal}\varphi_{\vec{\theta}})^{-1}(\varphi_{\vec{\theta}}^{\intercal}\varphi_{t})|\cdot|(\varphi_{\vec{\theta}}^{\intercal}\varphi_{\vec{\theta}})|=0\end{equation}
I took $\varphi_{\vec{\theta}}$ and $\varphi_{t}$ to be sub-matrices of $g$ and used the formula for the determinant of a block matrix: \begin{equation}\det\begin{pmatrix}A& B\\ C& D\end{pmatrix} = \det\left(A - B D^{-1} C\right)\det(D)\end{equation}
I need help finding the mistake above, since $|g|$ is obviously not always $0$.
You cannot use the formula $(AB)^{-1}=B^{-1}A^{-1}$ when $A$ and $B$ are non-square (hence non-invertible) matrices.