mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
45 lines (28 loc) • 818 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Solves the linear equation system by forwards substitution. Matrix must be a lower triangular matrix.
`L * x = b`
```js
math.lsolve(L, b)
```
Parameter | Type | Description
--------- | ---- | -----------
`L` | Matrix, Array | A N x N matrix or array (L)
`b` | Matrix, Array | A column vector with the b values
### Returns
Type | Description
---- | -----------
DenseMatrix | Array | A column vector with the linear system solution (x)
## Examples
```js
const a = [[-2, 3], [2, 1]]
const b = [11, 9]
const x = lsolve(a, b) // [[-5.5], [20]]
```
[](lup.md),
[](slu.md),
[](usolve.md),
[](lusolve.md)