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 ..... are not 0

but

since R'x = 0 =>

but is not zero as is 0 and we can have = say 1 ....so we can determine value of 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.