Functions that generate "easy" matrices of full rank

1k Views Asked by At

While explaining how to invert matrices I once used this ill-fated example $A=\begin{pmatrix} 1&2&3\\4&5&6 \\7&8&9 \end{pmatrix}$ which can not be inverted ($\det(A)=0$). That got me thinking, given a matrix of size $N$, what are some good functions that map to the elements such that:

  1. The elements are integers
  2. The elements are "small" (for hand calculation)
  3. The matrix is always invertible
  4. (optional) the function has a random component, but still satisfies (3)

Let $A_{ij} = f(j + (i-1)N)$. In the example above $f(n) = n$.

1

There are 1 best solutions below

0
On BEST ANSWER

For very structured matrices, where you know the determinant in advance, use Vandermonde matrices. One can also disguise them a little.

If you want a random component, make the entries on the main diagonal odd, and the all the remaining entries in some row or some column even, with the rest of the entries arbitrary. Then the determinant will be odd, and in particular non-zero.

There are many variants of this idea. For example, choose entries down the main diagonal not divisible by $3$, and the remaining entries in some row or some column divisible by $3$.