通过MCP连接 →

输入计算

数学公式

广告

结果

x = 2
y = 3
z = -1
基于克拉默法则
行列式
det(A) -1
det(Aₓ) -2
det(A_y) -3
det(A_z) 1

这个计算器能做什么

本工具采用克拉默法则(Cramer's Rule)求解含有三个未知数(x、y、z)的三元一次方程组。你只需按标准形式输入每个方程的系数即可:

$$a_1 x + b_1 y + c_1 z = d_1$$
$$a_2 x + b_2 y + c_2 z = d_2$$
$$a_3 x + b_3 y + c_3 z = d_3$$

计算器会先算出系数矩阵的行列式,再算出三个替换后的行列式,最终给出 x、y、z 的精确值。

使用方法

在每一行中输入四个数字:三个系数(a、b、c)以及等号右侧的常数项(d)。支持负数和小数。结果面板除了显示解之外,还会列出 \(\det(A)\)、\(\det(A_x)\)、\(\det(A_y)\) 和 \(\det(A_z)\),方便你自行核对计算过程。

公式详解

克拉默法则指出:对于方程组 \(A \cdot v = d\),只要系数矩阵的行列式不为零,每个未知数都可以这样求出——将系数矩阵 A 中对应的那一列替换为常数列向量 d,计算替换后的行列式,再除以 \(\det(A)\)。因此 \(x = \det(A_x)/\det(A)\),y、z 的求法同理。如果 \(\det(A) = 0\),方程组就没有唯一解,此时无法使用克拉默法则。

$$x = \frac{D_x}{D}, \quad y = \frac{D_y}{D}, \quad z = \frac{D_z}{D}$$ $$\text{where}\quad \left\{ \begin{aligned} D &= \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix} \\[0.4em] D_x &= \begin{vmatrix} d_1 & b_1 & c_1 \\ d_2 & b_2 & c_2 \\ d_3 & b_3 & c_3 \end{vmatrix} \\[0.4em] D_y &= \begin{vmatrix} a_1 & d_1 & c_1 \\ a_2 & d_2 & c_2 \\ a_3 & d_3 & c_3 \end{vmatrix} \\[0.4em] D_z &= \begin{vmatrix} a_1 & b_1 & d_1 \\ a_2 & b_2 & d_2 \\ a_3 & b_3 & d_3 \end{vmatrix} \end{aligned} \right.$$
Advertisement
Diagram showing Cramer's rule with matrix A and three modified matrices A1, A2, A3 where each column is replaced by the constants vector b
Cramer's Rule replaces one column of A with the constants vector b to form A1, A2, and A3.

实例演算

求解:\(2x + y - z = 8\);\(-3x - y + 2z = -11\);\(-2x + y + 2z = -3\)。

\(\det(A) = -1\),\(\det(A_x) = -2\),\(\det(A_y) = 3\),\(\det(A_z) = -1\)。由此可得最终结果:\(x = 2\),\(y = 3\),\(z = -1\)。代回第一个方程验证:$$2(2) + 3 - (-1) = 4 + 3 + 1 = 8 \checkmark$$

Three intersecting planes meeting at a single point in 3D space representing the unique solution of a 3x3 linear system
Each equation is a plane; their single common intersection point is the solution (x, y, z).

常见问题

如果 \(\det(A)\) 等于零怎么办?此时方程组要么无解,要么有无穷多解;克拉默法则要求行列式不为零,因此计算器会对这种情况给出提示。

可以输入小数或分数吗?小数可以直接输入。分数请先换算成小数(例如 \(1/2 = 0.5\))。

克拉默法则的效率高吗?对于 3×3 方程组来说,它既快速又精确。但对于规模大得多的方程组,通常更推荐使用高斯消元法。

最后更新: