Suppose $h$ is a convex function. Let $x$ and $y$ be vectors of possibly different lengths, and $A$ a matrix. Show that the function $f$ defined as
$$ f(x,y) = h(y) \qquad Ay=x\\ \qquad \qquad \infty \qquad otherwise $$
is convex in $(x,y)$.
Suppose $h$ is a convex function. Let $x$ and $y$ be vectors of possibly different lengths, and $A$ a matrix. Show that the function $f$ defined as
$$ f(x,y) = h(y) \qquad Ay=x\\ \qquad \qquad \infty \qquad otherwise $$
is convex in $(x,y)$.
Another way is to express the constraint $y=Ax$ using Lagrange multiplier. For each $\lambda \ge 0$, consider the function $f_\lambda(x,y) = h(y) + \lambda \|Ax-y\|$. It is clearly convex. Then $f(x,y)=\sup_{\lambda \ge0} f_\lambda $ is also convex.