mrdivide, /
Solve systems of linear equations xA = B for x
Syntax
Description
solves the system of linear equations x = B/Ax*A = B for
x. The matrices A and
B must contain the same number of columns. MATLAB® displays a warning message if A is badly
scaled or nearly singular, but performs the calculation regardless.
If
Ais a scalar, thenB/Ais equivalent toB./A.If
Ais a squaren-by-nmatrix andBis a matrix withncolumns, thenx = B/Ais a solution to the equationx*A = B, if it exists.If
Ais a rectangularm-by-nmatrix withm ~= n, andBis a matrix withncolumns, thenx=B/Areturns a least-squares solution of the system of equationsx*A = B.
Examples
Input Arguments
Output Arguments
Tips
The operators
/and\are related to each other by the equationB/A = (A'\B')'.If
Ais a square matrix, thenB/Ais roughly equal toB*inv(A), but MATLAB processesB/Adifferently and more robustly.Use
decompositionobjects to efficiently solve a linear system multiple times with different right-hand sides.decompositionobjects are well-suited to solving problems that require repeated solutions, since the decomposition of the coefficient matrix does not need to be performed multiple times.
Extended Capabilities
Version History
Introduced before R2006a