Is there a general way to compute the inverse of this complex matrix? Suppose I have a complex matrix of dimension $2N+1\times 2N+1$, call it $A=z_{i}\delta_{ij}$, with $i,j\in\{1,..,2N+1\}$ and $z_{i}\in\mathbb{C}$; $A$ is diagonal. Now suppose a constant real matrix $B = b\delta_{i,N+1} + b\delta_{j,N+1}$ with $b\in\mathbb{R}$ (this is the cross matrix, which has constant values along row $N+1$ and constant values along column $N+1$, zero entries elsewhere). My matrix is:
\begin{eqnarray}
C=A - B
\end{eqnarray}
Is there a closed analytical formula for $C^{-1}_{ij}$, so that we can obtain the $ij$ components of the matrix? How does one start on such calculation, specially considering $N$ is huge?
 A: There should be a fairly simple formula, but it might be somewhat tedious to calculate by hand.
This is one of those situations where it's slightly easier to just see what your matrix does to vectors and work your way backwards.
First let's invert what we can
$$
A^{-1} C = I - A^{-1} B
$$
Let $y_i = -b/a_i$ then we get that
$$
A^{-1} C x = x + \langle x, y \rangle e_{N+1} + y x_{N+1}
$$
where $e_{N+1}$ is the $N+1$st unit vector and $\langle x, y \rangle$ is the inner product.
If we let $z = A^{-1} C x$ then this implies the following two linear equations
$$
z_{N+1} 
= x_{N+1} + \langle x, y \rangle + y_{N+1} x_{N+1} 
= (1 + y_{N+1}) x_{N+1} + \langle x, y \rangle
$$
and
$$
\langle z, y \rangle 
= \langle x, y \rangle + \langle x, y \rangle y_{N+1} + y^2 
=  (1 + y_{N+1})\langle x, y \rangle + y^2 x_{N+1}
$$
Together these allow you to solve for $\langle x, y \rangle$ and $x_{N+1}$ by inverting the following matrix
$$
M = \begin{pmatrix}
(1 + y_{N+1}) & y^2\\\\
1 & (1 + y_{N+1})
\end{pmatrix}
$$
which allows you to recover $x$ by using that
$$
x = z - \langle x, y \rangle e_{N+1} - x_{N+1} y
$$
So in short, find $y$ calculate $M$ invert it and then you can solve $Cx = b$ by letting $z = A^{-1} b = A^{-1} C x$ and then use the following two steps
$$
\begin{pmatrix}
\alpha \\\\
\beta
\end{pmatrix} = M^{-1} \begin{pmatrix}
\langle z, y \rangle \\\\
z_{N+1}
\end{pmatrix}  \\\\
x = z - \alpha e_{N+1} - \beta y
$$
From this point the values of $C^{-1}_{ij}$ can be found by putting this all together and working through the calculation for all unit vectors.
