Matrix A has rank n iff diagnol entries of R' are non zero

Sorry about formatting as this is my first post here.

Question :- A mXn matrix (m>=n), A=Q'R' (Reduced QR)

To show that A has rank n iff diagonal entries of R' are non zero.

My Solution :-

if Ax = 0 => Q'R'x = 0 => R'x =0

let R' = upper triangular matrix (nXn) and x is a column vector.

suppose $\displaystyle r_{nn}$ .....$\displaystyle r_{k+1k+1}$ are not 0

but $\displaystyle r_{kk} = 0 $

since R'x = 0 => $\displaystyle x_n = x_{n-1}..... = x_{k+1} = 0 $

but $\displaystyle x_k$ is not zero as $\displaystyle r_{kk}$ is 0 and we can have $\displaystyle x_k$= say 1 ....so we can determine value of $\displaystyle x_{k-1} .... x_1$ by back substitution

=> x is a nonzero vector such that R'x = 0

I am not able to go beyond this.....Am I taking right approach..

Any help is appreciated.