All Projects → friendly → matlib

friendly / matlib

Licence: other
Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics, http://friendly.github.io/matlib/

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to matlib

PyGLM
Fast OpenGL Mathematics (GLM) for Python
Stars: ✭ 167 (+203.64%)
Mutual labels:  vector, matrix, matrix-functions
Blasjs
Pure Javascript manually written 👌 implementation of BLAS, Many numerical software applications use BLAS computations, including Armadillo, LAPACK, LINPACK, GNU Octave, Mathematica, MATLAB, NumPy, R, and Julia.
Stars: ✭ 241 (+338.18%)
Mutual labels:  vector, matrix
glm
OpenGL Mathematics (GLM)
Stars: ✭ 6,667 (+12021.82%)
Mutual labels:  vector, matrix
vec-la-fp
↗️ A tiny (functional) 2d linear algebra library
Stars: ✭ 21 (-61.82%)
Mutual labels:  vector, matrix
Hlslpp
Math library using hlsl syntax with SSE/NEON support
Stars: ✭ 153 (+178.18%)
Mutual labels:  vector, matrix
Math Php
Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra
Stars: ✭ 2,009 (+3552.73%)
Mutual labels:  vector, matrix
elm-3d-camera
Camera type for doing 3D rendering in Elm
Stars: ✭ 12 (-78.18%)
Mutual labels:  vector, matrix
Lacaml
OCaml bindings for BLAS/LAPACK (high-performance linear algebra Fortran libraries)
Stars: ✭ 101 (+83.64%)
Mutual labels:  vector, matrix
SCNMathExtensions
Math extensions for SCNVector3, SCNQuaternion, SCNMatrix4
Stars: ✭ 32 (-41.82%)
Mutual labels:  vector, matrix
sparse
Sparse matrix formats for linear algebra supporting scientific and machine learning applications
Stars: ✭ 136 (+147.27%)
Mutual labels:  vector, matrix
LinAlg
实现一个线性代数库,为Python写扩展。《程序猿的数学3 线性代数》读后笔记
Stars: ✭ 17 (-69.09%)
Mutual labels:  vector, matrix
Matrixstats
R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors)
Stars: ✭ 151 (+174.55%)
Mutual labels:  vector, matrix
Node Sylvester
🐱 Sylvester is a vector, matrix, and geometry library for JavaScript, that runs in the browser and on the server.
Stars: ✭ 144 (+161.82%)
Mutual labels:  vector, matrix
Nalgebra
Linear algebra library for Rust.
Stars: ✭ 2,433 (+4323.64%)
Mutual labels:  vector, matrix
Numphp
Mathematical PHP library for scientific computing
Stars: ✭ 120 (+118.18%)
Mutual labels:  vector, matrix
Mathematics for Machine Learning
Learn mathematics behind machine learning and explore different mathematics in machine learning.
Stars: ✭ 28 (-49.09%)
Mutual labels:  vector, matrix
Matrix Puppet Hangouts
Matrix bridge for Google Hangouts
Stars: ✭ 42 (-23.64%)
Mutual labels:  vector, matrix
Algebra
means completeness and balancing, from the Arabic word الجبر
Stars: ✭ 92 (+67.27%)
Mutual labels:  vector, matrix
matrixgl
Yet another matrix library for WebGL
Stars: ✭ 25 (-54.55%)
Mutual labels:  vector, matrix
GenericTensor
The only library allowing to create Tensors (matrices extension) with custom types
Stars: ✭ 42 (-23.64%)
Mutual labels:  vector, matrix

CRAN_Status_Badge Travis-CI Build Status Rdoc

matlib

Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics, http://friendly.github.io/matlib/

Version 0.9.4

These functions are mainly for tutorial purposes in teaching & learning matrix algebra ideas using R. In some cases, functions are provided for concepts or computations available elsewhere in R, but where the name is not obvious. In other cases, we provide cover functions to show or demonstrate an algorithm in more detail, sometimes providing a verbose = argument to print the details of computations.

In addition, a collection of functions are provided for drawing vector diagrams in 2D and 3D, illustrating various concepts of linear algebra more concretely than has been available before.

Installation

Get the released version from CRAN:

 install.packages("matlib")

The development version can be installed to your R library directly from this repo via:

 if (!require(devtools)) install.packages("devtools")
 library(devtools)
 install_github("friendly/matlib", build_vignettes = TRUE)

This installs the package from the source and creates the package vignettes, so you will need to have R Tools installed on your system. R Tools for Windows takes you to the download page for Windows. R Tools for Mac OS X has the required programs for Mac OS X.

The functions that draw 3D graphs use the rgl package. On macOS, rgl requires that XQuartz be installed. After installing XQuartz, it's necessary either to log out of and back into your macOS account or to reboot your Mac.

Topics

The functions in this package are grouped under the following topics

  1. Convenience functions:
  • tr() - trace of a matrix
  • R() - rank of a matrix
  • J() - constant vector, matrix or array
  • len() - Euclidean length of a vector or columns of a matrix
  • vec() - vectorize a matrix
  • Proj(y, X) - projection of vector y on columns of X
  • mpower(A, p) - matrix powers for a square symmetric matrix
  • xprod(...) - vector cross-product
  1. Determinants: functions for calculating determinants by cofactor expansion
  • minor() - Minor of A[i,j]
  • cofactor() - Cofactor of A[i,j]
  • rowMinors() - Row minors of A[i,]
  • rowCofactors() - Row cofactors of A[i,]
  • Det() - Determinants by elimination or eigenvalues
  1. Elementary row operations: functions for solving linear equations "manually" by the steps used in row echelon form and Gaussian elimination
  • rowadd() - Add multiples of rows to other rows
  • rowmult() - Multiply rows by constants
  • rowswap() - Interchange two rows of a matrix
  1. Linear equations: functions to illustrate linear equations of the form $\mathbf{A x = b}$
  • showEqn(A, b) - show matrices (A, b) as linear equations
  • plotEqn(A, b), plotEqn3d(A, b) - plot matrices (A, b) as linear equations
  1. Gaussian elimination: functions for illustrating Gaussian elimination for solving systems of linear equations of the form $\mathbf{A x = b}$. These functions provide a verbose=TRUE argument to show the intermediate steps and a fractions=TRUE argument to show results using MASS::fractions.
  • gaussianElimination(A, B) - reduces (A, B) to (I, A^{-1} B)
  • Inverse(X), inv() - uses gaussianElimination to find the inverse of X
  • echelon(X) - uses gaussianElimination to find the reduced echelon form of X
  • Ginv(X) - uses gaussianElimination to find the generalized inverse of X
  • LU(X) - LU decomposition of a matrix X
  • cholesky() - calculates a Cholesky square root of a matrix
  • swp() - matrix sweep operator
  1. Eigenvalues: functions to illustrate the algorithms for calculating eigenvalues and eigenvectors and related matrix decompositions and generalizations.
  • Eigen() - eigenvalues and eigenvectors
  • SVD() - singular value decomposition
  • powerMethod() - find the dominant eigenvector using the power method
  • showEig() - draw eigenvectors on a 2D scatterplot with a dataEllipse
  • MoorePenrose() - illustrates how the Moore-Penrose inverse can be calculated using SVD()
  1. Vector diagrams: functions for drawing vector diagrams in 2D and 3D
  • arrows3d() - draw nice 3D arrows
  • corner(), arc() - draw a corner or arc showing the angle between two vectors in 2D/3D
  • pointOnLine() - position of a point along a line
  • vectors(), vectors3d() - plot geometric vector diagrams in 2D/3D
  • regvec3d() - calculate and plot vectors representing a bivariate regression model, lm(y ~ x1 + x2) in mean-deviation form.

Vignettes and presentations

A small collection of vignettes is now available. Use browseVignettes("matlib") to explore them.

Vignette Title
det-ex1 Properties of determinants
det-ex2 Evaluation of determinants
inv-ex1 Inverse of a matrix
inv-ex2 Matrix inversion by elementary row operations
ginv Generalized inverse
eigen-ex1 Eigenvalues and Eigenvectors: Properties
eigen-ex2 Eigenvalues: Spectral Decomposition
linear-equations Solving Linear Equations
gramreg Gram-Schmidt Orthogonalization and Regression
data-beta Vector Spaces of Least Squares and Linear Equations

See also: Fox & Friendly, Visualizing Simultaneous Linear Equations, Geometric Vectors, and Least-Squares Regression with the matlib Package for R, June 2016, useR! Conference, Stanford.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].