Can a matrix have the same range and nullspace? If you can pick any $3\times 3$ matrix, is there a matrix that its $R(A) = N(A)$?
If you can pick any $4\times 4$ matrix, is $R(A) = N(A)$ possible?
Here, $R(A)$ is the range of matrix A, and $N(A)$ is the nullspace of matrix A
I thought the answers to both questions would be "no" because
$R(A)$ is obtained from $Ax=b$, where $b \not= 0$
$N(A)$ is obtained from $Ax=0$.
The vectors in both spaces will never be the same. I wonder why the question would be structured in such a way.
 A: Here I assume $R$ means "range", not "row space". 
If $A$ is $2n \times 2n$ then you can do it. Take $n$ independent vectors in $\mathbb{R}^{2n}$, call them $x_1,\dots,x_n$, and another $n$ vectors independent of each other and of the $x_i$, call them $y_1,\dots,y_n$. Now map $x_i$ to $y_i$ and map $y_i$ to zero. If $x_1,\dots,x_n = e_1,\dots,e_n$ and $y_1,\dots,y_n = e_{n+1},\dots,e_{2n}$, then we can write the matrix in block form:
$$\begin{bmatrix} 0 & 0 \\ I_n & 0 \end{bmatrix}$$
If $A$ is not square then this clearly can't happen, because then $R(A)$ and $N(A)$ are subspaces of different spaces. If $A$ is $(2n+1) \times (2n+1)$ then it still can't happen, because the rank-nullity theorem tells you that the dimensions of $R(A)$ and $N(A)$ must be different.
A: Your basic misunderstanding is that because the definitions of range and null space involve different equations, they cannot have common vectors. (The question that was posed to you goes further, in requiring them to be identical sets, but you seem to argue that even having some common nonzero vector is impossible.) But the equations are not the whole story; range and null space are linked in a different manner to their equations. The vague "obtained from" in your question takes two different meanings in the two cases.
The null space is simply the solution set for the unknown $x$ in the equation $Ax=0$. But the range is not the solution set for the unknown $x$ in the equation $Ax=b$ (in fact, for what value of$~b$ would that be?), it is the set of vectors $b$ for which this equation has a non-empty solution set. If for some $x$ one sets $b=Ax$, then that $b$ is automatically in the range space; it might also be in the null space if $Ab=0$. This is not directly related to the first equation. In fact the equations combined give $A(Ax)=0$ and for some matrices $A$ it is possible to have this, even without having $x=0$.
Since the question lets you choose $A$ freely, it is really about what contraints there are thet relate the subspaces $R(A)$ and $N(A)$ as $A$ varies. It turns out there is one, and only one, such constraint, namely that $\dim(R(A))+\dim(N(A))=n$ (the size of the matrix), as the rank-nullity theorem says. Then having $R(A)=N(A)$ requires $n$ to be even, so it cannot be done for $n=3$, but it can for $n=4$.
A: Suppose $\mathcal{R}(A)\subseteq\mathcal{N}(A)$.
Then one has: $A^2x\equiv0$
Assume now $\mathcal{R}(A)=\mathcal{N}(A)$.
By the rank-nullity theorem: $\dim\mathcal{D}(A)=2\dim\mathcal{R}(A)\in2\mathbb{N}$
So one has special nilpotent matrices over evendimensional spaces!
One example is given by:
$$\begin{pmatrix}0&1\\0&0\end{pmatrix}$$
A: for the nilpotent matrix $A = \pmatrix{0 & 1\\0&0}$ both $R(A)$ and $N(A)$ are spanned by $\pmatrix{1\\0}.$
you cannot have $R(A) = C(A)$ for odd dimension because of the nullity theorem. here is why: suppose $dim(N(A) = \dim(R(A)$ and $n$ is odd. Then $$n = \dim(N(A)) + dim(rowspace of A) = dim(N(A) + dim(R(A) = 2*\dim(N(A)$$ contradiction.
you make two copies of the case for $n = 2$ to construct an example for $n = 4.$ for example $$A_4 = \pmatrix{0&1&0&0\\0&0&0&0\\0&0&0&1\\0&0&0&0}, \mbox{ both } R(A) \mbox{ and } N(A) \mbox{ are spanned by } \pmatrix{1\\0\\0\\0\\}, \pmatrix{0\\0\\1\\0}.$$
A: The range of a linear transformation is the image of the linear transformation.  It is the vectors that your linear transformation "outputs".
The nullspace of a linear transformation is the preimage of the null vector.  It is the vectors that map to zero.
As the dimension of the null space and range add up to the dimension of the "input" space of a linear transformation, and if they are equal they have the same dimension, a number times two must be even.  So a linear transformation from an odd dimensional space back to itself cannot have a null space and range the same.
If the dimension of the space is even it is easy.  Suppose you want a transformation going from a space X back to itself, where the dimension of X is 2N.
First pick the subspace S you want to be both the range and the nullspace.  It must have dimension N by the above argument.
Let $B_S$ be a basis for the space S.
Extend $B_S$ to a basis for X with N new vectors $A_X$.
For a vector x from X, express it as a linear combination of the above basis:
$\sum b_i * {B_S}_i + \sum a_j * {A_X}_j$.
Define $T(x) := \sum a_j * {B_S}_j$.  This has the required properties.
We can build a matrix corresponding to this transformation pretty easily.  It has zeros in 3 of the 4 quadrents, and in the bottom left or top right quadrant it has an identity sub matrix (depending on if you put $B_S$ first or second).
We can compose $T$ with any invertable transformation on $B$ to get the entire family.  This corresponds to the non-zero quadrant in the matrix being an arbitrary nonsingular submatrix.
