Learn R Programming

Matrix (version 1.7-4)

Sparse and Dense Matrix Classes and Methods

Description

A rich hierarchy of sparse and dense matrix classes, including general, symmetric, triangular, and diagonal matrices with numeric, logical, or pattern entries. Efficient methods for operating on such matrices, often wrapping the 'BLAS', 'LAPACK', and 'SuiteSparse' libraries.

Copy Link

Version

Install

install.packages('Matrix')

Monthly Downloads

108,657

Version

1.7-4

License

GPL (>= 2) | file LICENCE

Maintainer

Martin Maechler

Last Published

August 28th, 2025

Functions in Matrix (1.7-4)

KNex

Koenker-Ng Example Sparse Model Matrix and Response Vector
CAex

Albers' example Matrix with "Difficult" Eigen Factorization
Hilbert

Generate a Hilbert matrix
Cholesky-class

Dense Cholesky Factorizations
BunchKaufman-methods

Methods for Bunch-Kaufman Factorization
CsparseMatrix-class

Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form
BunchKaufman-class

Dense Bunch-Kaufman Factorizations
CHMfactor-class

Sparse Cholesky Factorizations
Diagonal

Construct a Diagonal Matrix
Cholesky-methods

Methods for Cholesky Factorization
Matrix-defunct

Defunct Functions in Package Matrix
MatrixClass

The Matrix (Super-) Class of a Class
Matrix-deprecated

Deprecated Functions in Package Matrix
Matrix-notyet

Virtual Classes Not Yet Really Implemented and Used
KhatriRao

Khatri-Rao Matrix Product
Matrix-class

Virtual Class "Matrix" of Matrices
Matrix

Construct a Classed Matrix
Schur-class

Schur Factorizations
RsparseMatrix-class

Class "RsparseMatrix" of Sparse Matrices in Row-compressed Form
MatrixFactorization-class

Virtual Class "MatrixFactorization" of Matrix Factorizations
USCounties

Contiguity Matrix of U.S. Counties
TsparseMatrix-class

Class "TsparseMatrix" of Sparse Matrices in Triplet Form
abIndex-class

Class "abIndex" of Abstract Index Vectors
abIseq

Sequence Generation of "abIndex", Abstract Index Vectors
asUniqueT

Standardize a Sparse Matrix in Triplet Format
Schur-methods

Methods for Schur Factorization
bdiag

Construct a Block Diagonal Matrix
bandSparse

Construct Sparse Banded Matrix from (Sup-/Super-) Diagonals
all.equal-methods

Matrix Package Methods for Function all.equal()
band-methods

Extract bands of a matrix
boolmatmult-methods

Boolean Arithmetic Matrix Products: %&% and Methods
dMatrix-class

(Virtual) Class "dMatrix" of "double" Matrices
ddenseMatrix-class

Virtual Class "ddenseMatrix" of Numeric Dense Matrices
condest

Compute Approximate CONDition number and 1-Norm of (Large) Matrices
chol-methods

Compute the Cholesky Factor of a Matrix
coerce-methods-SparseM

Sparse Matrix Coercion from and to those from package SparseM
coerce-methods-graph

Conversions "graph" <--> (sparse) Matrix
cbind2-methods

'cbind()' and 'rbind()' recursively built on cbind2/rbind2
chol2inv-methods

Inverse from Cholesky Factor
colSums-methods

Form Row and Column Sums and Means
denseMatrix-class

Virtual Class "denseMatrix" of All Dense Matrices
dgTMatrix-class

Sparse matrices in triplet form
dimScale

Scale the Rows and Columns of a Matrix
dgeMatrix-class

Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices
diagU2N

Transform Triangular Matrices from Unit Triangular to General Triangular and Back
denseLU-class

Dense LU Factorizations
ddiMatrix-class

Class "ddiMatrix" of Diagonal Numeric Matrices
dgRMatrix-class

Sparse Compressed, Row-oriented Numeric Matrices
diagonalMatrix-class

Class "diagonalMatrix" of Diagonal Matrices
dgCMatrix-class

Compressed, sparse, column-oriented numeric matrices
dtRMatrix-class

Triangular Sparse Compressed Row Matrices
dtCMatrix-class

Triangular, (compressed) sparse column matrices
dsCMatrix-class

Numeric Symmetric Sparse (column compressed) Matrices
drop0

Drop Non-Structural Zeros from a Sparse Matrix
dsyMatrix-class

Symmetric Dense (Packed or Unpacked) Numeric Matrices
dpoMatrix-class

Positive Semi-definite Dense (Packed | Non-packed) Numeric Matrices
dsRMatrix-class

Symmetric Sparse Compressed Row Matrices
dsparseMatrix-class

Virtual Class "dsparseMatrix" of Numeric Sparse Matrices
dmperm

Dulmage-Mendelsohn Permutation / Decomposition
dtpMatrix-class

Packed Triangular Dense Matrices - "dtpMatrix"
expm-methods

Matrix Exponential
fastMisc

“Low Level” Coercions and Methods
forceSymmetric-methods

Force a Matrix to 'symmetricMatrix' Without Symmetry Checks
generalMatrix-class

Class "generalMatrix" of General Matrices
image-methods

Methods for image() in Package 'Matrix'
facmul-methods

Multiplication by Factors from Matrix Factorizations
expand-methods

Expand Matrix Factorizations
dtrMatrix-class

Triangular, dense, numeric matrices
formatSparseM

Formatting Sparse Numeric Matrices Utilities
externalFormats

Read and write external matrix formats
isSymmetric-methods

Methods for Function 'isSymmetric' in Package 'Matrix'
invertPerm

Utilities for Permutation Vectors
kronecker-methods

Methods for Function 'kronecker()' in Package 'Matrix'
isTriangular-methods

Test whether a Matrix is Triangular or Diagonal
indMatrix-class

Index Matrices
is.na-methods

is.na(), is.finite() Methods for 'Matrix' Objects
ldenseMatrix-class

Virtual Class "ldenseMatrix" of Dense Logical Matrices
is.null.DN

Are the Dimnames dn NULL-like ?
index-class

Virtual Class “index” of Index Vectors
ldiMatrix-class

Class "ldiMatrix" of Diagonal Logical Matrices
mat2triplet

Map Matrix to its Triplet Representation
lgeMatrix-class

Class "lgeMatrix" of General Dense Logical Matrices
nMatrix-class

Class "nMatrix" of Non-zero Pattern Matrices
lu-methods

Methods for LU Factorization
lsparseMatrix-class

Sparse logical matrices
matmult-methods

Matrix (Cross) Products (of Transpose)
nearPD

Nearest Positive Definite Matrix
ltrMatrix-class

Triangular Dense Logical Matrices
lsyMatrix-class

Symmetric Dense Logical Matrices
ndenseMatrix-class

Virtual Class "ndenseMatrix" of Dense Logical Matrices
norm-methods

Matrix Norms
pack-methods

Representation of Packed and Unpacked Dense Matrices
pMatrix-class

Permutation matrices
packedMatrix-class

Virtual Class "packedMatrix" of Packed Dense Matrices
nsparseMatrix-class

Sparse "pattern" Matrices
ntrMatrix-class

Triangular Dense Logical Matrices
nnzero-methods

The Number of Non-Zero Values of a Matrix
ngeMatrix-class

Class "ngeMatrix" of General Dense Nonzero-pattern Matrices
nsyMatrix-class

Symmetric Dense Nonzero-Pattern Matrices
printSpMatrix

Format and Print Sparse Matrices Flexibly
rep2abI

Replicate Vectors into 'abIndex' Result
rleDiff-class

Class "rleDiff" of rle(diff(.)) Stored Vectors
spMatrix

Sparse Matrix Constructor From Triplet
qr-methods

Methods for QR Factorization
rankMatrix

Rank of a Matrix
sparseLU-class

Sparse LU Factorizations
sparse.model.matrix

Construct Sparse Design / Model Matrices
rsparsematrix

Random Sparse Matrix
rcond-methods

Estimate the Reciprocal Condition Number
solve-methods

Methods in Package Matrix for Function solve
symmetricMatrix-class

Virtual Class of Symmetric Matrices in Package Matrix
triangularMatrix-class

Virtual Class of Triangular Matrices in Package Matrix
subscript-methods

Methods for "[": Extraction or Subsetting in Package 'Matrix'
sparseVector

Sparse Vector Construction from Nonzero Entries
sparseQR-class

Sparse QR Factorizations
subassign-methods

Methods for "[<-" - Assigning to Subsets for 'Matrix'
sparseMatrix-class

Virtual Class "sparseMatrix" --- Mother of Sparse Matrices
sparseVector-class

Sparse Vector Classes
wrld_1deg

Contiguity Matrix of World One-Degree Grid Cells
unpackedMatrix-class

Virtual Class "unpackedMatrix" of Unpacked Dense Matrices
symmpart-methods

Symmetric Part and Skew(symmetric) Part of a Matrix
sparseMatrix

General Sparse Matrix Construction from Nonzero Entries
updown-methods

Updating and Downdating Sparse Cholesky Factorizations