rowCofactors: Row Cofactors of A[i,]

Description Usage Arguments Value Author(s) See Also Examples

View source: R/determinants.R

Description

Returns the vector of cofactors of row i of the square matrix A. The determinant, Det(A), can then be found as M[i,] %*% rowCofactors(M,i) for any row, i.

Usage

1

Arguments

A

a square matrix

i

row index

Value

a vector of the cofactors of A[i,]

Author(s)

Michael Friendly

See Also

Det for the determinant

Other determinants: Det, adjoint, cofactor, minor, rowMinors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
M <- matrix(c(4, -12, -4,
              2,   1,  3,
             -1,  -3,  2), 3, 3, byrow=TRUE)
minor(M, 1, 1)
minor(M, 1, 2)
minor(M, 1, 3)
rowCofactors(M, 1)
Det(M)
# expansion by cofactors of row 1
M[1,] %*% rowCofactors(M,1)

matlib documentation built on April 4, 2018, 5:03 p.m.