HOMOGEN Function

HOMOGEN (matrix) ;

The HOMOGEN function solves the homogeneous system of linear equations $\mb {A}*\mb {X}=\mb {0}$ for $\mb {X}$. For at least one solution vector $\mb {X}$ to exist, the $m \times n$ matrix $\mb {A}$, $m \geq n$, has to be of rank $r < n$. The HOMOGEN function computes an $n \times (n-r)$ column orthonormal matrix $\mb {X}$ with the properties that $\mb {A}*\mb {X}=\mb {0}$ and $\mb {X}^{\prime } \mb {X}=\mb {I}$. In other words, the columns of $\mb {X}$ form an orthonormal basis for the nullspace of $A$.

If $\mb {A}^{\prime }\mb {A}$ is ill-conditioned, rounding-error problems can occur in determining the correct rank of $\mb {A}$ and in determining the correct number of solutions $\mb {X}$.

The following statements compute an example from Wilkinson and Reinsch (1971):

a = {22  10   2   3   7,
     14   7  10   0   8,
     -1  13  -1 -11   3,
     -3  -2  13  -2   4,
      9   8   1  -2   4,
      9   1  -7   5  -1,
      2  -6   6   5   1,
      4   5   0  -2   2};
x = homogen(a);
print x;

Figure 24.161: Solutions to a Homogeneous System

x
-0.419095 0
0.4405091 0.4185481
-0.052005 0.3487901
0.6760591 0.244153
0.4129773 -0.802217


In addition, you can use the HOMOGEN function to determine the rank of an $m \times n$ matrix $\mb {A}$ where $m \geq n$ by counting the number of columns in the matrix $\mb {X}$.

If $A$ is an $n\times m$ matrix, then, in addition to the memory allocated for the return matrix, the HOMOGEN function temporarily allocates an $n^2 + nm$ array for performing its computation.