Module 5: Doing Math
Module 5: Doing Math
##Module 5: Doing Math
##Your Assignment:
#Find the value of inverse of a matrix, determinant of a matrix by using the following values:
# A=matrix(1:100, nrow=10)
# B=matrix(1:1000, nrow=10)
# Post your result and procedure you took on your blog.
# A good start will be:
# >A <- matrix(1:100, nrow=10)
# >B <- matrix(1:1000, nrow=10)
library(dplyr)
library(Matrix)
library(matlib)
install.packages("matlib")
#The instructions are posted above, but lets get started by identifying the first step: Finding the Inverse of the Matrix
##Lets start with Matrix A
a <- matrix(1:100, nrow = 10)
View(a)
##Let's generate the inverse of the matrix
solve(a)
det(a)
#Matrix B
b <-matrix(1:100, nrow = 10)
Inverse(b)
det(b)
# Both determinants ended up being zero, but both methods of inverting the matrix spun an error message because that the matrix
#is a non singular matrix, in the case of both a and b
Comments
Post a Comment