Type:
Class
Constants:
SELECTORS : {all: true, diagonal: true, off_diagonal: true, lower: true, strict_lower: true, strict_upper: true, upper: true}.freeze

The Matrix class represents a mathematical matrix. It provides methods for creating matrices, operating on them arithmetically and algebraically, and determining their mathematical properties (trace, rank, inverse, determinant).

Method Catalogue

To create a matrix:

To access Matrix elements/columns/rows/submatrices/properties:

Properties of a matrix:

Matrix arithmetic:

Matrix functions:

Matrix decompositions:

Complex arithmetic:

  • conj

  • conjugate

  • imag

  • imaginary

  • real

  • rect

  • rectangular

Conversion to other data types:

String representations:

to_a
  • References/Ruby on Rails/Ruby/Classes/Matrix/Matrix::LUPDecomposition

to_a() Instance Public methods Alias for:

2025-01-10 15:47:30
elements_to_i
  • References/Ruby on Rails/Ruby/Classes/Matrix

elements_to_i() Instance Public methods

2025-01-10 15:47:30
solve
  • References/Ruby on Rails/Ruby/Classes/Matrix/Matrix::LUPDecomposition

solve(b) Instance Public methods Returns m so that A*m =

2025-01-10 15:47:30
to_ary
  • References/Ruby on Rails/Ruby/Classes/Matrix/Matrix::LUPDecomposition

to_ary() Instance Public methods Returns L, U, P

2025-01-10 15:47:30
eigen
  • References/Ruby on Rails/Ruby/Classes/Matrix

eigen() Instance Public methods Alias for:

2025-01-10 15:47:30
upper_triangular?
  • References/Ruby on Rails/Ruby/Classes/Matrix

upper_triangular?() Instance Public methods Returns true is this

2025-01-10 15:47:30