Prove that if Ax = b has a solution for every b, then A is invertible I am interested in the case that $A$ is a matrix over a commutative ring, not necessarily a field. Is it still true that if $Ax = b$ has a solution for every $b$, then $A$ is invertible? I know that in the general setting, $A$ having the trivial nullspace does not imply that it is invertible. However, I cannot seem to find a counterexample to the fact in the title of the question, so I am starting to believe it is true. Any ideas how to prove it? 
 A: The result is wrong as stated, since by taking for $A$ a rectangular matrix (more columns than rows) one easily gets counterexamples. I will therefore suppose you implicitly assumed $A$ to be square (a necessary condition for being invertible).
This is then a complement to the answer by basket, using a simple argument found in this answer. By the hypothesis you can find a matrix $B$ such that $AB=I$, since this amounts for every column of $B$ to an equation of the form $Ax=c$, where $c$ is the corresponding column of $I$. Now taking determinants we get $\det(A)\det(B)=1$, so the determinant of $A$ is invertible in your commutative ring. Then $A$ as well is invertible in the matrix ring, namely $\det(B)$ times the cofactor matrix of $A$ gives $A^{-1}$.
That was all that was asked for, but multiplying $AB=I$ to the left by $A^{-1}$ shows that in fact $B=A^{-1}$ and hence $BA=I$. Note that commutativity of the base ring (which allowed taking determinants) is essential; the result does not hold over non-commutative rings (even for $1\times1$ matrices, since for a scalar having a right inverse now does not imply having a left inverse).
A: For each standard basis vector $e_1, \dots, e_n$, we have some $b_1, \dots, b_n$ such that $A b_i = e_i$, respectively. Then simply 'squishing' the $b_1, \dots, b_n$ together into a $n \times n$ matrix directly gives $A^{-1}$.
A: As user basket wrote there are solution vectors $x_i$ for
$$
A x_i = e_i
$$
where $e_i$ is the $i$-th canonical basis vector.
Then $X = (x_1 x_2 \dotsb x_n)$ fulfills $A X = I$.
If there exists a $Y$ with $Y A = I$, then we would have
$$
Y = Y I = Y (A X) = (Y A) X = I X = X
$$
I still lack a simple argument, why there should exist a left-inverse for $A$ as well, or rather why would $X$ work as left-inverse too.
Marc's argument looks nice but would have me to review determinant theory over commutative rings instead of the usual fields. :)
Let us assume $A$ is invertible and
$$
X A =: B \ne I
$$
Then
$$
A B = A (X A) = (A X) A = I A = A
$$
and 
$$
A (B - I) = 0
$$
If $B- I \ne 0$ then at least one of its row vectors is non-zero, let us call it $r$ and we got
$\DeclareMathOperator{ker}{ker}r \in \ker A$.
For regular linear algebra (over a field) this would prevent $A$ from being invertible. No idea what happens for just commutative rings.
