Q and Qr, improvements to draw_matrix