🧊 QR 分解计算器QR Decomposition Calculator
用 Householder 反射把 m×n 矩阵(m ≥ n,最大 8×8)分解为 A = QR:Q 的列为标准正交向量,R 为上三角矩阵(对角线取非负)。给出精简形式或完整形式,并验算 QR 与 A 的最大误差和 QᵀQ 的正交性。Factor an m×n matrix (m ≥ n, up to 8×8) as A = QR with Householder reflections: Q has orthonormal columns and R is upper triangular with a non-negative diagonal. Choose the reduced or full form, and see the largest error of QR against A and how close QᵀQ is to I.
使用说明与常见问题How-to & FAQ
「QR 分解计算器」是什么?What is the QR Decomposition Calculator tool?
用 Householder 反射把 m×n 矩阵(m ≥ n,最大 8×8)分解为 A = QR:Q 的列为标准正交向量,R 为上三角矩阵(对角线取非负)。给出精简形式或完整形式,并验算 QR 与 A 的最大误差和 QᵀQ 的正交性。Factor an m×n matrix (m ≥ n, up to 8×8) as A = QR with Householder reflections: Q has orthonormal columns and R is upper triangular with a non-negative diagonal. Choose the reduced or full form, and see the largest error of QR against A and how close QᵀQ is to I.
如何使用「QR 分解计算器」?How do I use the QR Decomposition Calculator tool?
在「QR 分解计算器」中,填写「形式」、「小数位数」等参数,结果会随输入实时计算并显示在下方。In the QR Decomposition Calculator: Fill in "Form", "Decimal places"; results are recalculated instantly as you type.
QR 分解是什么?What is QR decomposition?
把矩阵写成 A = QR:Q 的列是两两正交的单位向量(QᵀQ = I),R 是上三角矩阵。它常用于解最小二乘问题(Rx = Qᵀb)、求特征值的 QR 算法,以及数值稳定地求解线性方程组。It writes a matrix as A = QR, where Q's columns are orthonormal (QᵀQ = I) and R is upper triangular. It's used for least squares (solve Rx = Qᵀb), the QR eigenvalue algorithm and numerically stable linear solves.
为什么用 Householder 反射?Why Householder reflections?
Householder 方法逐列把对角线下方的元素消为 0,数值稳定性比经典 Gram–Schmidt 好。为使结果唯一,本工具把 R 的对角线调整为非负(相应翻转 Q 的列)。经典例子 [[12, −51, 4], [6, 167, −68], [−4, 24, −41]] 得到 R = [[14, 21, −14], [0, 175, −70], [0, 0, 35]]。Householder reflections zero out the entries below the diagonal column by column and are more numerically stable than classical Gram–Schmidt. To make the result unique the tool makes R's diagonal non-negative, flipping the matching columns of Q. The classic example [[12, −51, 4], [6, 167, −68], [−4, 24, −41]] gives R = [[14, 21, −14], [0, 175, −70], [0, 0, 35]].
精简和完整形式有什么区别?Reduced or full form?
对 m×n 矩阵(m > n),精简 QR 的 Q 是 m×n、R 是 n×n;完整 QR 的 Q 是 m×m 的正交矩阵,R 是 m×n(下面补零行)。两者的 QR 乘积相同。计算用双精度浮点,验算行给出误差。For an m×n matrix with m > n, the reduced form has Q as m×n and R as n×n; the full form has an m×m orthogonal Q and an m×n R padded with zero rows. Both multiply back to A. Arithmetic is double-precision floating point, and the check row shows the error.
计算精度如何?How precise are the results?
「QR 分解计算器」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The QR Decomposition Calculator uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.
「QR 分解计算器」免费吗?需要注册吗?Is the QR Decomposition Calculator free? Do I need an account?
「QR 分解计算器」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The QR Decomposition Calculator is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.