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:

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

ArrayA is the cell range or array containing matrix A. It must contain numeric values only. Its number of rows has to equal its number of columns.

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

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

The result of this function is a vector with the solutions.

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 also need to use the TRANSPOSE function with the following syntax:

TRANSPOSE(MSOLVE(ArrayA, VectorB))

Annotation:

The result of this function is calculated using singular value decomposition. When applied to large matrices (more than 10, 20 rows), significant rounding errors can 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})

The result is the vector {8;-4}, which means that x=8 and y=-4.

Compatibility notes:

This function is not supported by Microsoft Excel. If you save a document in Excel format, all calculations using this function will be replaced by their last result as a fixed value.

See also:

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