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:

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

row(i) Instance Public methods Returns row vector number i of the

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

transpose() Instance Public methods Returns the transpose of the matrix.

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

regular?() Instance Public methods Returns true if this is a regular

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

v_inv() Instance Public methods Alias for:

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

d() Instance Public methods Alias for:

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

-(m) Instance Public methods Matrix

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

==(other) Instance Public methods Returns true if and only if the

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

zero(row_count, column_count = row_count) Class Public methods Creates a zero

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

rows(rows, copy = true) Class Public methods Creates a matrix where rows

2025-01-10 15:47:30