I have a matrix A1 and I want to calculate it's null space.
A1=matrix(c(1,1,2,3,2,1,1,3,1,4),nrow=2,ncol=5,byrow =TRUE)
[,1] [,2] [,3] [,4] [,5]
[1,] 1 1 2 3 2
[2,] 1 1 3 1 4
I have using the function 'nullspace' from the package 'pracma'.
nullspace(matrix(c(1,1,2,3,2,1,1,3,1,4),nrow=2,ncol=5,byrow =TRUE))
and the result I am getting is
[,1] [,2] [,3]
[1,] -0.53530338 -0.53530338 -0.6117753
[2,] 0.23344278 -0.76655722 0.5525060
[3,] 0.68910778 0.02244112 -0.4505435
[4,] -0.07744944 0.25588390 0.1019625
[5,] -0.42200333 0.24466334 0.3272343
But when I am solving it manually, the result I am getting is
[,1] [,2] [,3]
[1,] -1 -7 2
[2,] 1 0 0
[3,] 0 2 -2
[4,] 0 1 0
[5,] 0 0 1
How can I get the second answer using R codes? I cant find any package for this.