Does a $g$ exists such that $\ker(g\circ f) = \{(x,y,z)\in \mathbb{R}^3: x = z\}$? 
Let $f:\Bbb{R}^3 \to \mathbb{R}^3$, $f(x,y,z)=(x-y,y-z,x-z)$ be a linear map. Does it exists a surjective linear map $g:\mathbb R^3 \to \mathbb R^2$ such that: $\ker(g\circ f) = \{(x,y,z)\in \mathbb{R}^3: x = z\}$

Using the Rank–nullity theorem I arrived at the conclusion that $g\circ f$ is not surjective, but because $f$ isn't surjective, this does not allow me to conclude anything about $g$. I don't any different way I can approach this exercise. I Don't know if this helps but did the calculations and discovered that: $\ker(f)=\{(t,t,t)|t\in \mathbb R\}$ and that $f(\mathbb R^3)=\{u(1,0,1) +v(-1,1,0)|u,v\in \mathbb R\}$. How can I solve this?
 A: $\ker f$ is contained in the plane $x = z$. So let us pick a basis for this plane that contains a basis for $\ker f$. That will be $u := (1,1,1)$ and $v :=(0,1,0)$. Remember: we want $g(f(u)) = 0$ and $g(f(v)) = 0$. Well, by choice, $f(u) = 0$ so that's easy. We just need to remember later to choose $g$ such that $g(f(v)) = 0$.
First, complete $\{u, v\}$ to a basis by adding some $w$ (any $w$ not in the plane works). So we have a basis $\{u, v, w\}$ that contains the basis for the kernel we want, and if we apply $f$ to this basis, we get $\{0, f(v), f(w)\}$ where $\{f(v), f(w)\}$ is a basis for the image of $f$. Let us finally complete $\{f(v), f(w)\}$ to a basis $\{f(v), f(w), z\}$ for $\mathbb{R}^3$.
These bases are picked in a way that makes defining $g$ easy. Because the bases include vectors for which we know where they need to go to. Namely, we need $g(f(u)) = 0$ and $g(f(v)) = 0$. So now, given this basis, we can define $g$, by saying what $g(f(v)), g(f(w)), g(z)$ are:

*

*We can define $g(f(v)) = 0$

*We can define $g(f(w))$ and $g(z)$ so that $g$ is surjective

*It follows from the fact that $g(f(w)) \neq 0$ that $\ker g = \{x = z\}$ (i.e. that it isn't larger)

A: Write $$G = \pmatrix{a& b&c\\ d&e&f}$$
We see $\ker(GF)$ is generated with $u=(1,0,1)$ and since $Fu = (1,-1,0)$ we get $$0=GFu = (a-b,d-e)\implies a = b\;\;{\text and} \;\; d=e$$   so $$G = \pmatrix{a& a& c\\ d&d & f}$$
So if you take $a=1=c=f$ and $d=0$ you are done since $\dim (Im(G)) = 2$.
