Lets consider the matrix:
\begin{pmatrix} a & b \\ c & d \\ \end{pmatrix}
You can memorize it as
\begin{pmatrix} a & b & c & d \end{pmatrix}
You can do it with every matrix, and in fact the computer do it every time.
If you have a $m\times n$ matrix you can access to the entry $a_{ij}$ with the formulae $(i-1)\times n + j$ (I start the array with $1$).
Let's consider a lower triangular matrix. You can ignore the upper part of the matrix.
You can actually use three major methods:
- store it by row,
- store it by column,
- proceed by diagonal entry.
I will show you the first and the third method by you have to find the formulae (because it is an homework).
Let's consider the matrix:
\begin{pmatrix} a_{11} & 0 \\ a_{21} & a_{22} \\ \end{pmatrix}
You save it as \begin{pmatrix} a_{11} & a_{21} & a_{22} \end{pmatrix}.
In the third method you memorize it as \begin{pmatrix} a_{11} & a_{22} & a_{21} \end{pmatrix}