# Subspace Detours Meet Gromov-Wasserstein
## Appendix A Subspace Detours
### Closed-Form between Gaussians
#### a.2.1 Quadratic GW Problem  
For \(GW\) with \(c(x,x^{\prime})=\|x-x^{\prime}\|_{2}^{2}\), we have for now no guarantee that there exists an optimal coupling which is a transport map. [PERSON] et al. [30] proposed to restrict the problem to the set of Gaussian couplings \(\pi(\mu,\
u)\cap\mathcal{N}_{p+q}\) where \(\mathcal{N}_{p+q}\) denotes the set of Gaussians in \(\mathbb{R}^{p+q}\). In that case, the problem becomes:  
\[GGW(\mu,\
u)=\inf_{\gamma\in\Pi(\mu,\
u)\cap\mathcal{N}_{p+q}}\iint\left(\|x -x^{\prime}\|_{2}^{2}-\|y-y^{\prime}\|_{2}^{2}\right)^{2}\!\mathrm{d}\gamma( x,y)\mathrm{d}\gamma(x^{\prime},y^{\prime}).\] (A2)  
In that case, they showed that an optimal solution is of the form \(T(x)=m_{\
u}+P_{\
u}AP_{\mu}^{T}(x-m_{\mu})\) with \(A=\left(\tilde{I}_{q}D_{\
u}^{\frac{1}{2}}(D_{\mu}^{(q)})^{-\frac{1}{2}}\quad 0 _{q,p-q}\right)\) and \(\tilde{I}_{q}\) of the form \(\mathrm{diag}\big{(}(\pm 1)_{i\leq q}\big{)}\). Since the problem is translation invariant, we can always solve the problem between the centered measures. In the following, we suppose that \(k=k^{\prime}\). Let us denote \(T_{E,F}\) as the optimal transport map for (A2) between \(\mathcal{N}(0,\Sigma_{E})\) and \(\mathcal{N}(0,\Lambda_{F})\). According to Theorem 4.1 in [PERSON] et al. [30], such a solution exists and is of the form (7). We also denote \(T_{E^{\perp},F^{\perp}}\) as the optimal transport map between \(\mathcal{N}(0,\Sigma/\Sigma_{E})\) and \(\mathcal{N}(0,\Lambda/\Lambda_{F})\) (which is well defined since we assumed \(p\geq q\) and hence \(p-k\geq q-k^{\prime}\) since \(k=k^{\prime}\)). We know that the Monge-Knothe transport map will be a linear map \(T_{\text{MK}}(x)=Bx\) with \(B\) a block triangular matrix of the form:  
\[B= \begin{pmatrix}T_{E,F}&0_{\
u^{\prime},p-k}\\ C&T_{E^{\perp},F^{\perp}}\end{pmatrix} \in\mathbb{R}^{q\times p},\]  
with \(C\in\mathbb{R}^{(q-k^{\prime})\times k}\) and such that \(B\Sigma B^{T}=\Lambda\) (to have well a transport map between \(\mu\) and \(\
u\)). Actually,  
\[B\Sigma B^{T}= \begin{pmatrix}T_{E,F}\Sigma_{E}T_{E,F}^{T}&T_{E,F}\Sigma_{E}C^{ T}+T_{E,F}\Sigma_{EE^{\perp}}T_{E^{\perp},F^{\perp}}^{T}\\ (C\Sigma_{E}+T_{E^{\perp},F^{\perp}}\Sigma_{E^{\perp}E})T_{E,F}^{T}&(C\Sigma _{E}+T_{E^{\perp},F^{\perp}}\Sigma_{E^{\perp}E})C^{T}+(C\Sigma_{EE^{\perp}}+T _{E^{\perp},F^{\perp}}\Sigma_{E^{\perp}})T_{E^{\perp},F^{\perp}}^{T}\end{pmatrix}  \!\!.\]First, we have well \(T_{E,F}\Sigma_{E}T_{E,F}^{T}=\Lambda_{F}\), as \(T_{E,F}\) is a transport map between \(\mu_{E}\) and \(v_{F}\). Then:  
\[B\Sigma B^{T}=\Lambda\iff \begin{cases}T_{E,F}\Sigma_{E}T_{E,F}^{T}=\Lambda_{F }\\ T_{E,F}\Sigma_{E}C^{T}+T_{E,F}\Sigma_{EE^{\perp}}T_{E^{\perp},F^{\perp}}^{T}= \Lambda_{FF^{\perp}}\\ (C\Sigma_{E}+T_{E^{\perp},F^{\perp}}\Sigma_{E^{\perp}E})T_{E,F}^{T}=\Lambda_{ F^{\perp}F}\\ (C\Sigma_{E}+T_{E^{\perp},F^{\perp}}\Sigma_{E^{\perp}E})C^{T}+(C\Sigma_{EE^{ \perp}}+T_{E^{\perp},F^{\perp}}\Sigma_{E^{\perp}})T_{E^{\perp},F^{\perp}}^{T}= \Lambda_{F^{\perp}}.\end{cases} \]  
We have:  
\[(C\Sigma_{E}+T_{E^{\perp},F^{\perp}}\Sigma_{E^{\perp}E})T_{E,F}^{T}=\Lambda_{ F^{\perp}F}\iff\text{C}\Sigma_{E}T_{E,F}^{T}=\Lambda_{F^{\perp}F}-T_{E^{ \perp},F^{\perp}}\Sigma_{E^{\perp}E}T_{E,F}^{T}.\]  
As \(k=k^{\prime}\), \(\Sigma_{E}T_{E,F}^{T}\in\mathbb{R}^{k\times k}\) and is invertible (as \(\Sigma_{E}\) and \(\Lambda_{F}\) are positive definite and \(T_{E,F}=P_{\mu_{E}}A_{E,F}P_{v_{F}}\) with \(A_{E,F}=\left(\tilde{I}_{k}D_{v_{F}}^{\dagger}D_{\mu_{E}}^{-\frac{1}{2}}\right)\) with positive values on the diagonals. Hence, we have:  
\[C=(\Lambda_{F^{\perp}F}(T_{E,F}^{T})^{-1}-T_{E^{\perp},F^{\perp}}\Sigma_{E^{ \perp}E})\Sigma_{E}^{-1}.\]  
Now, we still have to check the last two equations.