To find Basis and kernel of matrix A Given a matrix $A:$
\begin{pmatrix} 1 & 2 & 5 \\ 3 & 5 & 13 \\ -2 & -1 & -4 \end{pmatrix}
My textbook has reduced it to RREF to find kernel and dimension of it. To find the basis for image, they have taken $A^{T}$ and then reduce it to RREF. I don't understand why this has been done; this is my main point of frustration. 
Also, let me know if there are any alternative ways to find the basis for the image. Thank you in advance. 
 A: If you have the RREF, you can pick the columns of $A$ corresponding to the pivot columns of the RREF.
If you want a simplified basis, you cannot use the RREF of $A$, as row operations will change the column space. Instead, your book does column operations on $A$ (row operation on $A^T$) to eliminate the columns of $A$ down to echelon form.
A: The other answers don't answer your question about finding the kernel.
The question about the basis has been well answered here: https://math.stackexchange.com/a/1037452/340888

Recall that $\ker(T) =  \{ T(p) = \textbf0_c : p \in domain(T)\}$, where $0_c$ is the zero vector of the codomain.
That is, the kernel of the matrix contains all the vectors $(x, y, z)^T$ such that:
$\begin{pmatrix} 1 & 2 & 5 \\ 3 & 5 & 13 \\ -2 & -1 & -4 \end{pmatrix} 
\begin{pmatrix} x \\ y \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix} $
The matrix is not invertible since:
$\det\begin{pmatrix} 1 & 2 & 5 \\ 3 & 5 & 13 \\ -2 & -1 & -4 \end{pmatrix}=0$
Thus, the only solution is the trivial solution and $ker(T)=\{\textbf0_d\}$ where $0_d$ is the zero vector in the domain.
A: As the other answer indicates, we can find both the kernel and the image of a transformation using the rref of $A$ directly.
For your example, row reducing the matrix yields
$$
\begin{pmatrix} 1 & 2 & 5 \\ 3 & 5 & 13 \\ -2 & -1 & -4 \end{pmatrix} \to 
\pmatrix{
1&0&1\\0&1&2\\0&0&0
}
$$
We have a pivot (a leading "1") in the first and second column.  It follows that the first and second column form a basis of the image.  That is, the set
$$
\left\{ \pmatrix{1\\3\\-2},\pmatrix{2\\5\\-1}\right\}
$$
is a basis of the image of $A$.
