This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
–Part 1- Question 1
matrixA<-matrix(c(1,-1,3,-5,2,1,5,-9,6,-1,-2,4),nrow=3, byrow=TRUE)
matrixA
## [,1] [,2] [,3] [,4]
## [1,] 1 -1 3 -5
## [2,] 2 1 5 -9
## [3,] 6 -1 -2 4
rankofA<-qr(matrixA, LAPACK=FALSE)$rank
print('Rank of the Matrix')
## [1] "Rank of the Matrix"
print(rankofA)
## [1] 3
–Part 1- Question 2
print('Transpose of the Matrix')
## [1] "Transpose of the Matrix"
print(t(matrixA))
## [,1] [,2] [,3]
## [1,] 1 2 6
## [2,] -1 1 -1
## [3,] 3 5 -2
## [4,] -5 -9 4
–Part 1- Question 3 - Also refer the paper work
print('atleast write one orthonormal 3D vector space')
## [1] "atleast write one orthonormal 3D vector space"
v1 = c(1,0,0)
v2=c(0,1,0)
v3=c(0,0,1)
dot.v1.v2<-v1%*%v2
dot.v2.v3<-v2%*%v3
dot.v3.v1<-v3%*%v1
print(dot.v1.v2)
## [,1]
## [1,] 0
print(dot.v2.v3)
## [,1]
## [1,] 0
print(dot.v3.v1)
## [,1]
## [1,] 0
norm.v1 <- norm(v1,type="2")
norm.v2 <- norm(v2,type="2")
norm.v3 <- norm(v3,type="2")
norm.v1
## [1] 1
norm.v2
## [1] 1
norm.v3
## [1] 1
–Part 1- Question 5
print('Eigen Values and Eigen Vectors of Matrix')
## [1] "Eigen Values and Eigen Vectors of Matrix"
matrixQ5<-matrix(c(5,0,3,0,1,-2,1,2,0),nrow=3, byrow=TRUE)
print(matrixQ5)
## [,1] [,2] [,3]
## [1,] 5 0 3
## [2,] 0 1 -2
## [3,] 1 2 0
print(eigen(matrixQ5))
## $values
## [1] 5.471264+0.000000i 0.264368+1.742772i 0.264368-1.742772i
##
## $vectors
## [,1] [,2] [,3]
## [1,] 0.98551404+0i 0.2583505-0.2761849i 0.2583505+0.2761849i
## [2,] -0.06924766+0i -0.6725516+0.0000000i -0.6725516+0.0000000i
## [3,] 0.15481227+0i -0.2473752+0.5860519i -0.2473752-0.5860519i
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.