  For $n > k \geq 0$, $\lambda >0$, and $p, r>1$, we establish the following
optimal Hardy-Littlewood-Sobolev inequality \[ \Big| \iint_{\mathbf R^n \times
\mathbf R^{n-k}} \frac{f(x) g(y)}{ |x-y|^\lambda |y"|^\beta} dx dy \Big|
\lesssim \| f \| _{L^p(\mathbf R^{n-k})} \| g\| _{L^r(\mathbf R^n)} \] with $y
= (y', y") \in \mathbf R^{n-k} \times \mathbf R^k$ under the two necessary
conditions \[ \beta < \left\{ \begin{aligned} & k - k/r & & \text{if } \; 0 <
\lambda \leq n-k,\\ & n - \lambda - k/r & & \text{if } \; n-k < \lambda,
\end{aligned} \right. \] and \[ \frac{n-k}n \frac 1p + \frac 1r + \frac { \beta
+ \lambda} n = 2 -\frac kn. \] We call this the optimal
Hardy-Littlewood-Sobolev inequality on $\mathbf R^{n-k} \times \mathbf R^n$.
The existence of an optimal pair for this new inequality is also studied. The
motivation of working on the above inequality is to provide a unification of
many known Hardy-Littewood-Sobolev inequalities including the classical
Hardy-Littewood-Sobolev inequality when $k=\beta=0$, the
Hardy-Littewood-Sobolev inequality on the upper half space $\mathbf R^{n-1}
\times \mathbf R_+^n$ when $k=1$ and $\beta = 0$, and the
Hardy-Littewood-Sobolev inequality on the upper half space $\mathbf R^{n-1}
\times \mathbf R_+^n$ with extended kernel when $k=1$ and $\beta \ne 0$. We
show that the above condition for $\beta$ is sharp. In the unweighted case,
namely $\beta=0$, our finding immediately leads to the sharp
Hardy-Littlewood-Sobolev inequality on $\mathbf R^{n-k} \times \mathbf R^n$
with the optimal range $$0<\lambda<n-k/r,$$ which has not been observed before,
even in the case $k=1$. As one of many consequences, we give a short proof of
the Stein-Weiss inequality in the context of $\mathbf R^{n-k} \times \mathbf
R^n$.
