MSOLVE (solution of matrix equation Ax=B)

<< Click to Display Table of Contents >>

MSOLVE (solution of matrix equation Ax=B)

Syntax:

MSOLVE(ArrayA, VectorB)

Description:

This returns the solution to a linear system of equations by solving the matrix equation Ax=B.

ArrayA is the cell range or array that contains matrix A. It must contain numeric values only and be square, i.e., have the same number of rows and columns.

The determinant of this matrix must not be zero, as the equation cannot be solved otherwise.

VectorB is the cell range or array that contains vector B. VectorB must be a vector, which is an array or cell range of just one column.

The result of this function is a solution vector.

Please note: The MSOLVE function only calculates correctly if the vector with the solutions is arranged as a column. To arrange the vector with the solutions in a row, you must also use the TRANSPOSE function with the following syntax:

TRANSPOSE(MSOLVE(ArrayA, VectorB))

Additional info:

The result of this function is calculated using singular value decomposition. When applied to larger matrices (more than 10-20 rows), significant rounding errors may occur.

Note:

Formulas using this function have to be entered as an array formula. For more information, see Working with arrays.

Example:

To solve the following linear system of equations:

2x + 3y = 4

2x + 2y = 8

... use the following formula:

MSOLVE({2,3;2,2}, {4,8})

This results in the vector {8;-4}, which means that x=8 and y=-4.

Compatibility notes:

This function does not exist in Microsoft Excel. If you save a document in Excel format, all calculations using this function will be replaced with their current result as a fixed value.

See also:

Section Working with arrays, MDETERM, MINVERSE, MMULT, TRANSPOSE