usolve.md (947B)
1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> 2 3 # Function usolve 4 5 Finds one solution of a linear equation system by backward substitution. Matrix must be an upper triangular matrix. Throws an error if there's no solution. 6 7 `U * x = b` 8 9 10 ## Syntax 11 12 ```js 13 math.usolve(U, b) 14 ``` 15 16 ### Parameters 17 18 Parameter | Type | Description 19 --------- | ---- | ----------- 20 `U` | Matrix, Array | A N x N matrix or array (U) 21 `b` | Matrix, Array | A column vector with the b values 22 23 ### Returns 24 25 Type | Description 26 ---- | ----------- 27 DenseMatrix | Array | A column vector with the linear system solution (x) 28 29 30 ### Throws 31 32 Type | Description 33 ---- | ----------- 34 35 36 ## Examples 37 38 ```js 39 const a = [[-2, 3], [2, 1]] 40 const b = [11, 9] 41 const x = usolve(a, b) // [[8], [9]] 42 ``` 43 44 45 ## See also 46 47 [usolveAll](usolveAll.md), 48 [lup](lup.md), 49 [slu](slu.md), 50 [usolve](usolve.md), 51 [lusolve](lusolve.md)