If $x + y \in \mathbb Q$ and $x − 3 y \in \mathbb Q$, prove $x$ and $y$ are rational Consider $,  ∈ ℝ$, such that $ +  ∈ ℚ$ and $ − 3 ∈ ℚ$. Then $,  ∈ ℚ$.
Hey all. I'm recently working through a course-book that's involved with the math course I'm taking next semester and have come across this problem, although it has no solution (this would be taught in the course but I'm just looking over the content to get ahead)
I'm really stumped on how to solve this problem. My initial guess was to subtract $ + $ from $ − 3$ to prove that $-4y$ would be rational provided both equations were rational, and therefore we can assume $y$ is rational, and could potentially do the same for $x$ by multiplying the first equation... However I don't think this would be valid and am not sure.
How would I go about solving this type of problem? Thanks.
 A: Yes, it is valid. Since $-4y=q$, for some $q\in\Bbb Q$, $y=-\frac q4\in\Bbb Q$. And then $x=(x+y)-y\in\Bbb Q$.
A: Let $x,y \in \Bbb{R}$ such that $x+y,x-3y \in \Bbb{Q}$. We want to prove that $x,y \in \Bbb{Q}$. Since $x+y,x-3y \in \Bbb{Q}$, then
\begin{align*}
x+y = \frac{a}{b} && \text{ and } && x-3y = \frac{c}{d},
\end{align*}
where $a,c \in \Bbb{Z}$ and $b,d \in \Bbb{N}$. Now, form the first equality, one obtains that $x = \frac{a}{b} - y$. By substituting in the second inequality, one has $\frac{a}{b} - y -3y = \frac{c}{d}$. From here we get that $y = \frac{ad-bc}{4db}$. Substituting $y$ in the first equality yields that $x = \frac{3ad+bc}{4db}$. Therefore, we have that $x,y \in \Bbb{Q}$. $\square$
A: Alternatively,
$$(x+y)-(x-3y)=4y \Longrightarrow y \in\mathbb Q$$
$$(x+y)+(x-3y)=2(x-y) \Longrightarrow (x-y) \in\mathbb Q$$
$$(x-y)+(x+y)=2x \Longrightarrow x \in\mathbb Q.$$
A: Let $u=x + y$ and $v=x − 3 y$. Then
$$
\pmatrix{u \\v} = \pmatrix{1 & \hphantom-1 \\ 1 & -3} \pmatrix{x \\y}
$$
The matrix has nonzero determinant and so is invertible over $\mathbb Q$. Therefore, $u,v \in \mathbb Q \iff x,y \in \mathbb Q$.
Explicitly,
$$
\pmatrix{x \\y} = \pmatrix{3/4 & \hphantom-1/4 \\ 1/4 & -1/4} \pmatrix{u \\v} 
$$
