Learn R Programming

lazyNumbers (version 1.2.1)

lazyInv: Inverse of lazy matrix

Description

Compute the inverse of a lazy matrix.

Usage

lazyInv(M)

Value

A lazyMatrix object.

Arguments

M

a lazyMatrix object corresponding to a square matrix

Examples

Run this code
library(lazyNumbers)
set.seed(666L)
M <- lazymat(matrix(rpois(9L, lambda = 4), nrow = 3L, ncol = 3L))
invM <- lazyInv(M)
I3 <- M %*% invM
as.double(I3) == diag(3)

Run the code above in your browser using DataLab