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:

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

new(a) Class Public methods

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

imaginary() Instance Public methods Returns the imaginary part of the matrix

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

to_s() Instance Public methods Overrides

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

to_a() Instance Public methods Alias for:

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

minor(*param) Instance Public methods Returns a section of the matrix. The

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

imag() Instance Public methods Alias for:

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

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

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
row_count
  • References/Ruby on Rails/Ruby/Classes/Matrix

row_count() Instance Public methods Returns the number of rows.

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

-(m) Instance Public methods Matrix

2025-01-10 15:47:30