title: How to calculate null space of a matrix in R so that the resulting vectors show basic variables in terms of free variables in R?
body: <p>I have a matrix A1 and I want to calculate it's null space.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I have using the function 'nullspace' from the package 'pracma'.</p>
  
  <pre><code>nullspace(matrix(c(1,1,2,3,2,1,1,3,1,4),nrow=2,ncol=5,byrow =TRUE))
  </code></pre>
  
  <p>and the result I am getting is</p>
  
  <pre><code>            [,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
  </code></pre>
  
  <p>But when I am solving it manually, the result I am getting is</p>
  
  <pre><code>            [,1]        [,2]       [,3]
  [1,]         -1          -7          2
  [2,]          1           0          0
  [3,]          0           2         -2
  [4,]          0           1          0
  [5,]          0           0          1
  </code></pre>
  
  <p>How can I get the second answer using R codes?
  I cant find any package for this.</p>