Mathematics | ![]() ![]() |
Square Systems
The most common situation involves a square coefficient matrix A
and a single right-hand side column vector b
. The solution, x = A\b
, is then the same size as b
. For example,
x = A\u x = 10 -12 5
It can be confirmed that A*x
is exactly equal to u
.
If A
and B
are square and the same size, then X = A\B
is also that size.
X = A\B X = 19 -3 -1 -17 4 13 6 0 -6
It can be confirmed that A*X
is exactly equal to B
.
Both of these examples have exact, integer solutions. This is because the coefficient matrix was chosen to be pascal(3)
, which has a determinant equal to one. A later section considers the effects of roundoff error inherent in more realistic computation.
A square matrix A is singular if it does not have linearly independent columns. If A is singular, the solution to AX = B either does not exist, or is not unique. The backslash operator, A\B
, issues a warning if A is nearly singular and raises an error condition if exact singularity is detected.
![]() | Overview | Overdetermined Systems | ![]() |