Basic Examples (2)
Basic Examples
(2)
Define a matrix:
In[118]:=
(mat={{1,3,-2,1},{2,6,-2,8},{-1,-3,8,17}})//MatrixForm
Out[118]//MatrixForm=
1 | 3 | -2 | 1 |
2 | 6 | -2 | 8 |
-1 | -3 | 8 | 17 |
The first and third columns of the matrix are pivot columns:
In[119]:=
RowReduce[mat]//MatrixForm
Out[119]//MatrixForm=
1 | 3 | 0 | 7 |
0 | 0 | 1 | 3 |
0 | 0 | 0 | 0 |
Therefore, the first and third columns of the matrix form a basis for the column space:
In[120]:=
Out[120]=
{{1,2,-1},{-2,-2,8}}
———
Define a complex matrix:
In[121]:=
(mat={{2,1,1-,1+,1+,2+2},{,-,2+2,1+2,1+,2-},{-,1,-1+,-,-1+,2-},{13+5,-1+6,14-18,5-3,5+,-15+9}})//MatrixForm
Out[121]//MatrixForm=
2 | 1 | 1- | 1+ | 1+ | 2+2 |
| - | 2+2 | 1+2 | 1+ | 2- |
- | 1 | -1+ | - | -1+ | 2- |
13+5 | -1+6 | 14-18 | 5-3 | 5+ | -15+9 |
The first three columns are all pivot columns:
In[122]:=
RowReduce[mat]//MatrixForm
Out[122]//MatrixForm=
1 | 0 | 0 | 2+ | - 2 3 | 3+ 2 3 |
0 | 1 | 0 | -2 | 1 3 5 3 | - 4 3 4 3 |
0 | 0 | 1 | - | 2 3 | -1- 5 3 |
0 | 0 | 0 | 0 | 0 | 0 |
Therefore, the first three columns of the matrix form a basis for its column space:
In[123]:=
Out[123]=
{{2,,-,13+5},{1,-,1,-1+6},{1-,2+2,-1+,14-18}}