Problem regarding system of linear equations having rational solutions

determinantlinear algebramatricesproof-verification

Problem: Consider a system of $n$ linear equations in $n$ unknowns: $AX=B$, where $A$ and $B$ have integer entries. Prove or disprove the following:

$(a)$ The system has a rational solution if $\det A \neq 0$.

$(b)$ If the system has a rational solution, then it also has an integer solution.

Attempt:

$(a)$: The coefficient matrix $A$ is invertible. Hence, $X=A^{-1}B=\frac{adj(A)B}{\det A}$.

$adj(A)$ as well as $B$ has rational entries. So, their product must have rational entries. The denominator is a rational. So, $X$ has rational entries.

$(b)$: Counterexample: $A=[1]$, $X=[x]$, $B=[\frac{1}{2}]$ where $[.]$ denotes a $1 \times 1$ matrix.

I am not sure if everything is fine here. Kindly verify.

Best Answer

A correct counterexample to (b) is given by the equation $2x=1$, which has integer coefficients, a rational solution, but no integer solution.