Back to Linear Algebra
mldivide
Matrix left division (A\b)
Syntax
x = mldivide(A, b)
Description
Solves the linear system A*x = b. Equivalent to the backslash operator `A\b`. For square A, this uses direct solving. Prefer this over `inv(A)*b` for numerical stability.
Parameters
| Name | Description |
|---|---|
| A | Coefficient matrix |
| b | Right-hand side vector or matrix |
Returns
Solution vector or matrix x
Examples
Try It
>> A = [1 2; 3 4]; b = [5; 6]; mldivide(A, b)