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:

component
  • References/Ruby on Rails/Ruby/Classes/Matrix

component(i, j) Instance Public methods Alias for:

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

each_with_index(which = :all) Instance Public methods Same as

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

det() Instance Public methods Alias for:

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

determinant_e() Instance Public methods deprecated; use

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

tr() Instance Public methods Alias for:

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

l() Instance Public methods

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

square?() Instance Public methods Returns true is this is a square

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

find_index(*args) Instance Public methods Alias for:

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

eigensystem() Instance Public methods Returns the Eigensystem of the matrix;

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

conj() Instance Public methods Alias for:

2025-01-10 15:47:30