solve_lin {caracas}R Documentation

Solve a linear system of equations

Description

Find x in Ax = b. If b not supplied, the inverse of A is returned.

Usage

solve_lin(A, b)

Arguments

A

matrix

b

vector

Examples

if (has_sympy()) {
  A <- matrix_sym(2, 2, "a")
  b <- vector_sym(2, "b")
  # Inverse of A:
  solve_lin(A) %*% A |> simplify()
  # Find x in Ax = b
  x <- solve_lin(A, b)
  A %*% x |> simplify()
}


[Package caracas version 2.1.1 Index]