Definition HS. Homogeneous System.
A system of linear equations, \(\linearsystem{A}{\vect{b}}\) is homogeneous if the vector of constants is the zero vector, in other words, if \(\vect{b}=\zerovector\text{.}\)
zero_vector()
constructor will quickly create the necessary vector of constants (Sage V)..solve_right()
behaves on homogeneous systems, since in particular we know it will never give us an error. (Why not? Hint: Theorem HSC.).right_kernel()
, where again, we will rely exclusively on the “right” version. Also, to match our work in the text, and make the results more recognizable, we will consistently use the keyword option basis='pivot'
, which we will be able to explain once we have more theory (Sage SSNS, Sage SUTH0). Note too, that this is a place where it is critical that matrices are defined to use the rationals as their number system (QQ
).nsp
contains a lot of unfamiliar information. Ignore most of it for now. But as a set, we can test membership in nsp
.I
for the imaginary number \(i=\sqrt{-1}\) and we just clobbered that. We will not do it again. See below how to fix this.nsp
is an infinite set. Since we know the null space is defined as solutions to a system of equations, and the work above shows it has at least two elements, we are not surprised to discover that the set is infinite (Theorem PSSLS).# random
, is technically a “comment”, but we are using it as a signal to our automatic testing of the Sage examples that this example should be skipped. You do not need to use this device in your own work, though you may use the comment syntax if you wish..right_kernel()
so we will see more of this matrix method. In the meantime, if you are done experimenting with the matrix I
we can restore the variable I
back to being the imaginary number \(i = \sqrt{-1}\) with the Sage restore()
command.A
, with maybe one row and two columns. The number system you choose will have some effect on the results, so use QQ
for now. In a cell enter A.
(assuming you called your matrix A
, and be sure to include the period). Now hit the “TAB” key and you will get a long list of all the possible methods you can apply to A
using the dot notation.?
) on the end and hit the TAB
key again. You should get some nicely formatted documentation, along with example uses. (Try A.rref?
below for a good example of this.) You can replace the single question mark by two question marks, and as Sage is an open source program you can see the actual computer instructions for the method, which at first includes all the documentation again. Note that now the documentation is enclosed in a pair of triple quotation marks (""", """
) as part of the source code, and is not specially formatted. (Notice that the use of TAB
will not work as advertised with the Sage Cell server.)matrix()
and vector()
for linear algebra. Sage has a comprehensive Reference Manual and there is a Linear Algebra Quick Reference sheet among the other quick reference sheets at the Sage wikiwiki.sagemath.org/quickref
wiki.sagemath.org/quickref