Language Reference


HOMOGEN Function

HOMOGEN (matrix);

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

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

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 25.163: 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 $\bA $ where $m \geq n$ by counting the number of columns in the matrix $\bX $.

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.