I am trying to write a program that finds a QR factorization for an $m$x$n$ matrix $A$. I decided to use Givens' rotations to calculate the QR factorization, but i'm a bit confused on the procedure. I looked at the wikipedia example and this question, but the wikipedia article only has one example (and it uses a square matrix instead of a rectangular matrix), and I found the answer to the question a bit hard to follow. If anyone could give me some guidance on how to do this procedure, it would be greatly appreciated. Thanks!
(Edit: Also, I know I could use Gram-Schmidt instead of Givens' rotations, but I want to use Givens' rotations as a challenge)