Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Solve a linear system (linear_solve)

Solve a linear system A x = b given by its matrix and right-hand side.

With this function, the solver shows the steps whenever it finds them.

How to write it

linear_solve(matrix, b)

The vector x with A x = b.

matrix
The coefficient matrix A. Takes a matrix, written as a list of rows.
b
The right-hand side, as a list. Takes a list.

Examples

  • (2113)x=(35)⇒[45,75]\displaystyle \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix} \mathbf{x} = \begin{pmatrix} 3 \\ 5 \end{pmatrix} \Rightarrow \left[ \frac{4}{5}, \frac{7}{5} \right]
    linear_solve([[2, 1], [1, 3]], [3, 5])

    In the solver, linear_solve([[2, 1], [1, 3]], [3, 5]) gives [4/5, 7/5].

    Open in the solver
  • numeric_solve

    Solve equations numerically.

  • solve

    Solve equations for one or more unknowns.

  • solve_all

    Describe the complete solution set of equations and inequalities.

  • solve_identity

    Find the values of the parameters that make an equation true for every value of the variable.

  • least_squares

    The least-squares solution of A x = b.

  • find_root

    Find a root numerically, from a starting value.