Is this a known matrix function? Consider a linear $n$-dimensional system $\mathbf{y} = A\mathbf{x}$, where the $n$ variables $x_i$ and the $n$ variables $y_i$ are related linearly by the matrix $A$ and $\det(A)\neq 0$. For example let's say we have $2+2$ variables:
$$
\begin{pmatrix}
y_0\\
y_1
\end{pmatrix} 
=
\begin{pmatrix}
A_{00} & A_{01}\\
A_{10} & A_{11}
\end{pmatrix}
\begin{pmatrix}
x_0\\
x_1
\end{pmatrix}
$$
If we want to write $\mathbf{x}$ as a linear function of $\mathbf{y}$, we would use the inverse of $A$, i.e. $\mathbf{x} = A^{-1}\mathbf{y}$. So far all pretty standard.
But also other partitions of the set of $2n$ variables in two halves can be related linearly, e.g.
$$
\begin{pmatrix}
x_0\\
y_1
\end{pmatrix} = f(A)
\begin{pmatrix}
x_1\\
y_0
\end{pmatrix}
$$
could be well-defined. Is $f$ a known thing? For an $n$-dimensional system, what is $f$ given two halves (if it exists)?
EDIT:
I've noticed using block inversion that the solution given by @Fishbane should be equivalent to
$$
f(A) = (V_4-AV_2)^{-1}(AV_1-V_3)
$$
where the $V_i$ blocks are defined in the answer. This is a matrix version of the Möbius transform.
 A: We will consider the case of an $n\times n$ matrix $A$. (I believe this could be extended to non-square matrices fairly easily, but it requires some care) I will use block matrix notation extensively.
First consider that the set of points $\begin{bmatrix}x \\y \end{bmatrix}\in\Bbb{R}^{2n}$ such that $y=Ax$. This set is a linear subspace. Call it $\mathcal{S}$. It should be easy to see that $\mathcal{S}$ is spanned by the columns of the matrix $\begin{bmatrix}I\\A\end{bmatrix}$.
We want a linear relationship $\mathcal{L}:\mathcal{X}\to\mathcal{Y}$  where $\mathcal{X}$ and $\mathcal{Y}$ are $n$-dimensional subspaces of $\Bbb{R}^{2n}$, such that $\mathcal{X}+\mathcal{Y}\subseteq$ span $\left(\begin{bmatrix}I\\A\end{bmatrix}\right)$. (Clearly $\mathcal{L}$ does not always exist and may not be well-defined, but we shall for now assume it is fine.)
Define a matrix $V:=\begin{bmatrix}V_1 & V_2\\V_3 & V_4\end{bmatrix}$ such that $\begin{bmatrix}V_1\\V_3\end{bmatrix}=$ basis of $\mathcal{X}$, and $\begin{bmatrix}V_2\\V_4\end{bmatrix}=$ basis of $\mathcal{Y}$.
(For example, in the case in your question, $V=\begin{bmatrix}0&0&1&0\\1&0&0&0\\0&1&0&0\\0&0&0&1\end{bmatrix}$, and in general if you are only swapping coordinates $V$ will be a permutation matrix.)
For any $\begin{bmatrix}x \\y \end{bmatrix}\in\mathcal{S}$, we have some $\hat{x}\in\mathcal{X},\hat{y}\in\mathcal{Y}$ such that $\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}V_1 & V_2\\V_3 & V_4\end{bmatrix}\begin{bmatrix}\hat{x}\\\hat{y}\end{bmatrix}$, and some $\hat{v}\in\Bbb{R}^n$ such that $\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}I\\A\end{bmatrix}\begin{bmatrix}v\end{bmatrix}$. We are looking for $f(A)$ such that $\hat{y}=f(A)\hat{x}$. Therefore
$$\begin{align}
\begin{bmatrix}V_1 & V_2\\V_3 & V_4\end{bmatrix}\begin{bmatrix}\hat{x}\\\hat{y}\end{bmatrix}&=\begin{bmatrix}I\\A\end{bmatrix}\begin{bmatrix}v\end{bmatrix}\\
\begin{bmatrix}V_1\\V_3\end{bmatrix}\begin{bmatrix}\hat{x}\end{bmatrix}+\begin{bmatrix}V_2\\V_4\end{bmatrix}\begin{bmatrix}\hat{y}\end{bmatrix}&=\begin{bmatrix}I\\A\end{bmatrix}\begin{bmatrix}v\end{bmatrix}\\
\begin{bmatrix}V_1\\V_3\end{bmatrix}\begin{bmatrix}\hat{x}\end{bmatrix}&=\begin{bmatrix}I\\A\end{bmatrix}\begin{bmatrix}v\end{bmatrix}-\begin{bmatrix}V_2\\V_4\end{bmatrix}\begin{bmatrix}\hat{y}\end{bmatrix}\\
\begin{bmatrix}V_1\\V_3\end{bmatrix}\begin{bmatrix}\hat{x}\end{bmatrix}&=\begin{bmatrix}I & -V_2\\A & -V_4\end{bmatrix}\begin{bmatrix}v\\\hat{y}\end{bmatrix}.\\
\end{align}$$
Fixing $\hat{x}$, this is a linear equation in $\begin{bmatrix}v\\\hat{y}\end{bmatrix}$ and so if there are solutions we can use pseudoinverses to find a solution given by $$\begin{bmatrix}v\\\hat{y}\end{bmatrix}=\begin{bmatrix}I & -V_2\\A & -V_4\end{bmatrix}^+\begin{bmatrix}V_1\\V_3\end{bmatrix}\begin{bmatrix}\hat{x}\end{bmatrix}.$$
Thus if $f(A)$ is well defined then
$$f(A)= \text{last }n\text{ rows of }\begin{bmatrix}I & -V_2\\A & -V_4\end{bmatrix}^+\begin{bmatrix}V_1\\V_3\end{bmatrix}.$$
We can check for correctness by using the tests used to normally check if a pseudoinverse is giving correct answers. Alternatively if you haven't encountered pseudoinverses before they can be replaced by inverses as long as they are defined, additionally if they are defined you do not need to perform any further checks.
A: Suppose $A$ is an $n\times m$ matrix. As in the previous answer we consider linear subspaces $\mathcal{X}$ and $\mathcal{Y}$ along with a linear map $\mathcal{L}:\mathcal{X}\rightarrow\mathcal{Y}$ such that for all $\tilde{x}\in\mathcal{X}$, $\tilde{x}+\mathcal{L}(\tilde{x})$ is in the linear subspace spanned by the columns of $\begin{bmatrix}I\\A\end{bmatrix}$ where $I$ is the $m\times m$ identity matrix. (We shall assume $\mathcal{X}$ is $r$-dimensional and $\mathcal{Y}$ is $k$-dimensional).
Again following the previous answer we define $V:=\begin{bmatrix}V_1&V_2\\V_3&V_4\end{bmatrix}$ such that $\begin{bmatrix}V_1\\V_3\end{bmatrix}$ is a basis of $\mathcal{X}$ and $\begin{bmatrix}V_2\\V_4\end{bmatrix}$ is a basis of $\mathcal{Y}$. (Note that $V_1$ is $m\times k$ and $V_4$ is $n\times r$).
Now let $\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}V_1\\V_3\end{bmatrix}\begin{bmatrix}\hat{x}\end{bmatrix}+\begin{bmatrix}V_2\\V_4\end{bmatrix}\begin{bmatrix}\hat{y}\end{bmatrix}$, from this we conclude $x=V_1\hat{x}+V_2\hat{y}$ and $y=V_3\hat{x}+V_4\hat{y}$. (Where $\hat{x}$ is the coordinate representation of a vector in $\mathcal{X}$ according to the basis, and similarly for $\hat{y}$)
Now if $\begin{bmatrix}x\\y\end{bmatrix}$ is in the span of the columns of $\begin{bmatrix}I\\A\end{bmatrix}$ then we have;
$$\begin{align}
y&=Ax\\
V_3\hat{x}+V_4\hat{y}&=A(V_1\hat{x}+V_2\hat{y})\\
V_3\hat{x}+V_4\hat{y}&=AV_1\hat{x}+AV_2\hat{y}\\
V_4\hat{y}-AV_2\hat{y}&=AV_1\hat{x}-V_3\hat{x}\\
(V_4-AV_2)\hat{y}&=(AV_1-V_3)\hat{x}\\
\end{align}$$
Now assuming that $(V_4-AV_2)$ is square and invertible we conclude that $\hat{y}=(V_4-AV_2)^{-1}(AV_1-V_3)\hat{x}$.
Therefore the matrix for $\mathcal{L}$ is given by $(V_4-AV_2)^{-1}(AV_1-V_3)$. (i.e. $f(A)=(V_4-AV_2)^{-1}(AV_1-V_3)$).
We now consider the general case. Using generalized inverses we can see that if there is a solution we have $\hat{y}=(V_4-AV_2)^{+}(AV_1-V_3)\hat{x}$.
Now assuming that there is a unique linear map $\mathcal{L}$ we can use standard results about solving linear relations using generalized inverses to conclude that $I-(V_4-AV_2)^{+}(V_4-AV_2)=0$ (as otherwise there would be multiple solutions).
By examining ranks we can see that this is only possible if $(V_4-AV_2)$ has full column rank, and in fact it is always true if $(V_4-AV_2)$ has full column rank.
(As an aside this tells us that if $(V_4-AV_2)$ is square then $\mathcal{L}$ exists iff $(V_4-AV_2)$ is invertible).
Finally we can determine if the solution is valid by again using standard results to conclude that the solution is valid iff $(V_4-AV_2)(V_4-AV_2)^{+}(AV_1-V_3)=(AV_1-V_3)$.
Thus $\mathcal{L}$ exists iff $(V_4-AV_2)$ has full column rank and $(V_4-AV_2)(V_4-AV_2)^{+}(AV_1-V_3)=(AV_1-V_3)$. And if it exists $f(A)=(V_4-AV_2)^{+}(AV_1-V_3)$.
