Solution of system of linear equation A system of linear equations
$$
\sum_{j=1}^n b_{ij}y_j=f_i,\qquad i=1,\ldots,n\quad\tag{1}
$$
is solvable exactly if the vector $f=(f_1,\ldots,f_n)$ is orthogonal to all solutions of
$$
\sum_{j=1}^n b_{ji}z_j=0,\qquad i=1,\ldots,n.,\tag{2}
$$

How to prove the direction $\Leftarrow$?
I write (1) as $By=f$ and (2) as $B^\top z=0$.
My idea:
Suppose $\tilde{z}$ solves $B^\top z=0$ and $f^\top \tilde{z}=0$. I think I now have to prove that (1) has a solution. To this end, let $\tilde{x}\neq 0$. Then
$$
\tilde{x}^\top B^\top\tilde{z}=0=f^\top \tilde{z}~\Leftrightarrow \tilde{z}^\top B\tilde{x}=\tilde{z}^\top f~\Leftrightarrow B\tilde{x}=f
$$
meaning that $\tilde{x}$ is a solution of (1).
Can't be correct since this would imply that each $x\neq 0$ is a solution of (1)...
 A: You have the system
$ B y = f \hspace{30pt}(1) $
where $B$ is $n \times n$ and then you have the system
$ B^T z = 0 \hspace{30pt}(2) $
The set of solutions of $(2)$ are the null space of $B^T$ and are orthogonal to the rows of $B^T$.  If $f$ is orthogonal to all these solutions, then $f$ can be written as a linear combination of the rows of $B^T$, i.e. the columns of $B$.  This is true because the kernel (the null space) is the orthogonal complement of the row space.
Then
$ f = B k $
for some vector $k$
Substituting this into $(1)$
$ B y = B k $
so that
$ B (y - k) = 0 $
Thus $(y - k)$ is in the null space of $B$ (kernel of $B$), hence, in this case, a solution $y$ always exists and is of the form
$ y = k + a $
where $a \in \ker(B) $
Similarly, if $(1)$ has a solution $y$, then $f$ is a linear combination of the columns of $B$, i.e. the rows of $B^T$, and therefore, will be orthogonal to all the solutions of $B^T z = 0 $, because these solutions are, by definition, orthogonal to the rows of $B^T$.
