QR factorization of $$$\left[\begin{array}{ccccc}1 & 3 & 2 & 10 & 2\\2 & 4 & 2 & 14 & 5\\-1 & -2 & -1 & -7 & 3\\0 & 1 & 1 & 3 & 2\\4 & 1 & -3 & 7 & 5\end{array}\right]$$$
Related calculator: LU Decomposition Calculator
Your Input
Find the QR factorization of $$$\left[\begin{array}{ccccc}1 & 3 & 2 & 10 & 2\\2 & 4 & 2 & 14 & 5\\-1 & -2 & -1 & -7 & 3\\0 & 1 & 1 & 3 & 2\\4 & 1 & -3 & 7 & 5\end{array}\right]$$$.
Solution
Orthonormalize the set of vectors formed by the columns of the given matrix: $$$\left\{\left[\begin{array}{c}\frac{\sqrt{22}}{22}\\\frac{\sqrt{22}}{11}\\- \frac{\sqrt{22}}{22}\\0\\\frac{2 \sqrt{22}}{11}\end{array}\right], \left[\begin{array}{c}\frac{49 \sqrt{8646}}{8646}\\\frac{9 \sqrt{8646}}{1441}\\- \frac{9 \sqrt{8646}}{2882}\\\frac{\sqrt{8646}}{393}\\- \frac{23 \sqrt{8646}}{4323}\end{array}\right], \left[\begin{array}{c}\frac{43 \sqrt{1065423}}{2130846}\\\frac{227 \sqrt{1065423}}{710282}\\\frac{607 \sqrt{1065423}}{710282}\\\frac{685 \sqrt{1065423}}{2130846}\\\frac{52 \sqrt{1065423}}{1065423}\end{array}\right]\right\}$$$ (for steps, see Gram-Schmidt calculator).
The columns of the matrix $$$Q$$$ are the orthonormalized vectors: $$$Q = \left[\begin{array}{ccc}\frac{\sqrt{22}}{22} & \frac{49 \sqrt{8646}}{8646} & \frac{43 \sqrt{1065423}}{2130846}\\\frac{\sqrt{22}}{11} & \frac{9 \sqrt{8646}}{1441} & \frac{227 \sqrt{1065423}}{710282}\\- \frac{\sqrt{22}}{22} & - \frac{9 \sqrt{8646}}{2882} & \frac{607 \sqrt{1065423}}{710282}\\0 & \frac{\sqrt{8646}}{393} & \frac{685 \sqrt{1065423}}{2130846}\\\frac{2 \sqrt{22}}{11} & - \frac{23 \sqrt{8646}}{4323} & \frac{52 \sqrt{1065423}}{1065423}\end{array}\right].$$$
Since the number of columns of the matrix $$$Q$$$ is less than the number of columns of the initial matrix then we need to augment it.
To find a vector to augment with, find the null space of $$$Q^{T}$$$.
So, the null space of the matrix $$$\left[\begin{array}{ccccc}\frac{\sqrt{22}}{22} & \frac{\sqrt{22}}{11} & - \frac{\sqrt{22}}{22} & 0 & \frac{2 \sqrt{22}}{11}\\\frac{49 \sqrt{8646}}{8646} & \frac{9 \sqrt{8646}}{1441} & - \frac{9 \sqrt{8646}}{2882} & \frac{\sqrt{8646}}{393} & - \frac{23 \sqrt{8646}}{4323}\\\frac{43 \sqrt{1065423}}{2130846} & \frac{227 \sqrt{1065423}}{710282} & \frac{607 \sqrt{1065423}}{710282} & \frac{685 \sqrt{1065423}}{2130846} & \frac{52 \sqrt{1065423}}{1065423}\end{array}\right]$$$ is $$$\left\{\left[\begin{array}{c}-1\\\frac{3}{11}\\- \frac{5}{11}\\1\\0\end{array}\right], \left[\begin{array}{c}7\\- \frac{52}{11}\\\frac{17}{11}\\0\\1\end{array}\right]\right\}$$$ (for steps, see null space calculator).
Take the vector from the null space (any vector, for example, the first one, if there are many), normalize it (for steps, see unit vector calculator), and augment $$$Q$$$ with it: $$$Q = \left[\begin{array}{cccc}\frac{\sqrt{22}}{22} & \frac{49 \sqrt{8646}}{8646} & \frac{43 \sqrt{1065423}}{2130846} & - \frac{11 \sqrt{69}}{138}\\\frac{\sqrt{22}}{11} & \frac{9 \sqrt{8646}}{1441} & \frac{227 \sqrt{1065423}}{710282} & \frac{\sqrt{69}}{46}\\- \frac{\sqrt{22}}{22} & - \frac{9 \sqrt{8646}}{2882} & \frac{607 \sqrt{1065423}}{710282} & - \frac{5 \sqrt{69}}{138}\\0 & \frac{\sqrt{8646}}{393} & \frac{685 \sqrt{1065423}}{2130846} & \frac{11 \sqrt{69}}{138}\\\frac{2 \sqrt{22}}{11} & - \frac{23 \sqrt{8646}}{4323} & \frac{52 \sqrt{1065423}}{1065423} & 0\end{array}\right].$$$
Since the number of columns of the matrix $$$Q$$$ is less than the number of columns of the initial matrix then we need to augment it.
To find a vector to augment with, find the null space of $$$Q^{T}$$$.
So, the null space of the matrix $$$\left[\begin{array}{ccccc}\frac{\sqrt{22}}{22} & \frac{\sqrt{22}}{11} & - \frac{\sqrt{22}}{22} & 0 & \frac{2 \sqrt{22}}{11}\\\frac{49 \sqrt{8646}}{8646} & \frac{9 \sqrt{8646}}{1441} & - \frac{9 \sqrt{8646}}{2882} & \frac{\sqrt{8646}}{393} & - \frac{23 \sqrt{8646}}{4323}\\\frac{43 \sqrt{1065423}}{2130846} & \frac{227 \sqrt{1065423}}{710282} & \frac{607 \sqrt{1065423}}{710282} & \frac{685 \sqrt{1065423}}{2130846} & \frac{52 \sqrt{1065423}}{1065423}\\- \frac{11 \sqrt{69}}{138} & \frac{\sqrt{69}}{46} & - \frac{5 \sqrt{69}}{138} & \frac{11 \sqrt{69}}{138} & 0\end{array}\right]$$$ is $$$\left\{\left[\begin{array}{c}\frac{211}{69}\\- \frac{84}{23}\\- \frac{17}{69}\\\frac{272}{69}\\1\end{array}\right]\right\}$$$ (for steps, see null space calculator).
Take the vector from the null space (any vector, for example, the first one, if there are many), normalize it (for steps, see unit vector calculator), and augment $$$Q$$$ with it: $$$Q = \left[\begin{array}{ccccc}\frac{\sqrt{22}}{22} & \frac{49 \sqrt{8646}}{8646} & \frac{43 \sqrt{1065423}}{2130846} & - \frac{11 \sqrt{69}}{138} & \frac{211 \sqrt{187059}}{187059}\\\frac{\sqrt{22}}{11} & \frac{9 \sqrt{8646}}{1441} & \frac{227 \sqrt{1065423}}{710282} & \frac{\sqrt{69}}{46} & - \frac{84 \sqrt{187059}}{62353}\\- \frac{\sqrt{22}}{22} & - \frac{9 \sqrt{8646}}{2882} & \frac{607 \sqrt{1065423}}{710282} & - \frac{5 \sqrt{69}}{138} & - \frac{17 \sqrt{187059}}{187059}\\0 & \frac{\sqrt{8646}}{393} & \frac{685 \sqrt{1065423}}{2130846} & \frac{11 \sqrt{69}}{138} & \frac{272 \sqrt{187059}}{187059}\\\frac{2 \sqrt{22}}{11} & - \frac{23 \sqrt{8646}}{4323} & \frac{52 \sqrt{1065423}}{1065423} & 0 & \frac{\sqrt{187059}}{2711}\end{array}\right].$$$
Find the transpose of the matrix: $$$Q^{T} = \left[\begin{array}{ccccc}\frac{\sqrt{22}}{22} & \frac{\sqrt{22}}{11} & - \frac{\sqrt{22}}{22} & 0 & \frac{2 \sqrt{22}}{11}\\\frac{49 \sqrt{8646}}{8646} & \frac{9 \sqrt{8646}}{1441} & - \frac{9 \sqrt{8646}}{2882} & \frac{\sqrt{8646}}{393} & - \frac{23 \sqrt{8646}}{4323}\\\frac{43 \sqrt{1065423}}{2130846} & \frac{227 \sqrt{1065423}}{710282} & \frac{607 \sqrt{1065423}}{710282} & \frac{685 \sqrt{1065423}}{2130846} & \frac{52 \sqrt{1065423}}{1065423}\\- \frac{11 \sqrt{69}}{138} & \frac{\sqrt{69}}{46} & - \frac{5 \sqrt{69}}{138} & \frac{11 \sqrt{69}}{138} & 0\\\frac{211 \sqrt{187059}}{187059} & - \frac{84 \sqrt{187059}}{62353} & - \frac{17 \sqrt{187059}}{187059} & \frac{272 \sqrt{187059}}{187059} & \frac{\sqrt{187059}}{2711}\end{array}\right]$$$ (for steps, see matrix transpose calculator).
Finally, $$$R = \left[\begin{array}{ccccc}\frac{\sqrt{22}}{22} & \frac{\sqrt{22}}{11} & - \frac{\sqrt{22}}{22} & 0 & \frac{2 \sqrt{22}}{11}\\\frac{49 \sqrt{8646}}{8646} & \frac{9 \sqrt{8646}}{1441} & - \frac{9 \sqrt{8646}}{2882} & \frac{\sqrt{8646}}{393} & - \frac{23 \sqrt{8646}}{4323}\\\frac{43 \sqrt{1065423}}{2130846} & \frac{227 \sqrt{1065423}}{710282} & \frac{607 \sqrt{1065423}}{710282} & \frac{685 \sqrt{1065423}}{2130846} & \frac{52 \sqrt{1065423}}{1065423}\\- \frac{11 \sqrt{69}}{138} & \frac{\sqrt{69}}{46} & - \frac{5 \sqrt{69}}{138} & \frac{11 \sqrt{69}}{138} & 0\\\frac{211 \sqrt{187059}}{187059} & - \frac{84 \sqrt{187059}}{62353} & - \frac{17 \sqrt{187059}}{187059} & \frac{272 \sqrt{187059}}{187059} & \frac{\sqrt{187059}}{2711}\end{array}\right]\left[\begin{array}{ccccc}1 & 3 & 2 & 10 & 2\\2 & 4 & 2 & 14 & 5\\-1 & -2 & -1 & -7 & 3\\0 & 1 & 1 & 3 & 2\\4 & 1 & -3 & 7 & 5\end{array}\right] = \left[\begin{array}{ccccc}\sqrt{22} & \frac{17 \sqrt{22}}{22} & - \frac{5 \sqrt{22}}{22} & \frac{73 \sqrt{22}}{22} & \frac{29 \sqrt{22}}{22}\\0 & \frac{\sqrt{8646}}{22} & \frac{\sqrt{8646}}{22} & \frac{3 \sqrt{8646}}{22} & \frac{101 \sqrt{8646}}{8646}\\0 & 0 & 0 & 0 & \frac{2 \sqrt{1065423}}{393}\\0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0\end{array}\right]$$$ (for steps, see matrix multiplication calculator).
Answer
$$$Q = \left[\begin{array}{ccccc}\frac{\sqrt{22}}{22} & \frac{49 \sqrt{8646}}{8646} & \frac{43 \sqrt{1065423}}{2130846} & - \frac{11 \sqrt{69}}{138} & \frac{211 \sqrt{187059}}{187059}\\\frac{\sqrt{22}}{11} & \frac{9 \sqrt{8646}}{1441} & \frac{227 \sqrt{1065423}}{710282} & \frac{\sqrt{69}}{46} & - \frac{84 \sqrt{187059}}{62353}\\- \frac{\sqrt{22}}{22} & - \frac{9 \sqrt{8646}}{2882} & \frac{607 \sqrt{1065423}}{710282} & - \frac{5 \sqrt{69}}{138} & - \frac{17 \sqrt{187059}}{187059}\\0 & \frac{\sqrt{8646}}{393} & \frac{685 \sqrt{1065423}}{2130846} & \frac{11 \sqrt{69}}{138} & \frac{272 \sqrt{187059}}{187059}\\\frac{2 \sqrt{22}}{11} & - \frac{23 \sqrt{8646}}{4323} & \frac{52 \sqrt{1065423}}{1065423} & 0 & \frac{\sqrt{187059}}{2711}\end{array}\right]\approx \left[\begin{array}{ccccc}0.21320071635561 & 0.526973121544583 & 0.020829431935296 & -0.662122191971731 & 0.487857685579326\\0.426401432711221 & 0.580745889049132 & 0.329880073207831 & 0.180578779628654 & -0.582654676616067\\-0.21320071635561 & -0.290372944524566 & 0.882102222190103 & -0.300964632714423 & -0.039306069454258\\0 & 0.236600177020017 & 0.331817694783207 & 0.662122191971731 & 0.628897111268136\\0.852802865422442 & -0.494709461041853 & 0.050378160959786 & 0 & 0.159536399549637\end{array}\right]$$$A
$$$R = \left[\begin{array}{ccccc}\sqrt{22} & \frac{17 \sqrt{22}}{22} & - \frac{5 \sqrt{22}}{22} & \frac{73 \sqrt{22}}{22} & \frac{29 \sqrt{22}}{22}\\0 & \frac{\sqrt{8646}}{22} & \frac{\sqrt{8646}}{22} & \frac{3 \sqrt{8646}}{22} & \frac{101 \sqrt{8646}}{8646}\\0 & 0 & 0 & 0 & \frac{2 \sqrt{1065423}}{393}\\0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0\end{array}\right]\approx \left[\begin{array}{ccccc}4.69041575982343 & 3.624412178045377 & -1.066003581778052 & 15.563652293959562 & 6.182820774312703\\0 & 4.226539525857574 & 4.226539525857574 & 12.679618577572721 & 1.086209903591896\\0 & 0 & 0 & 0 & 5.2528920908454\\0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0\end{array}\right]$$$A