title: find rank of 2x2 array
body: <p>I have a 2d array that plays the role of a 2x2 matrix. How can I find the rank of that matrix. Until now I have this: </p>
  
  <pre><code>Scanner input=new Scanner(System.in);
  
  int[][] A = new int[2][2];
  int[][] B = new int[2][2];
  int[][] C = new int[2][2];
  
  System.out.println("Enter elements for matrix A : ");
  
  for (int i=0 ; i &lt; A.length ; i++)
  {
      for  (int j=0 ; j &lt; A[i].length ; j++)
      {
          A[i][j] = input.nextInt();
      }
  
      System.out.println("Matrix A: ");
      for (int i=0 ; i &lt; A.length ; i++)
      {
          System.out.println();
          for(int j=0 ; j &lt; A[i].length ; j++)
          {
              System.out.print(A[i][j]+" ");
          }
      }
  }
  </code></pre>
  
  <p>How can I find the rank of that matrix (array)?.</p>