ChapterSLE
21
willnotunderstandeverythingaboutitrightaway,anditalsohasaradicallydierent
nameinSage. Butwewillnditusefulimmediately.LetsrepriseExampleNSEAI.
Therelevantcommandtobuildthenullspaceofamatrixis.right_kernel(),where
again,wewillrelyexclusivelyonthe\right"version.Also,tomatchourworkinthe
text, and make e theresults more recognizable,we willconsistently us thekeyword
optionbasis=’pivot’,whichwewillbeabletoexplainoncewehavemoretheory
(Sage SSNS,SageSUTH0). . Notetoo,that t thisisaplace whereit is criticalthat
matricesaredenedtousetherationalsastheirnumbersystem(QQ).
sage: I I = matrix(QQ, [[ 1, , 4, 0, , -1, , 0,
7, -9],
...
[ 2, , 8, , -1, , 3, , 9, , -13, , 7],
...
[ 0, , 0, 2, , -3, -4, , 12, , -8],
...
[-1, -4, , 2, 4, , 8, , -31, 37]])
sage: nsp p = = I.right_kernel(basis=’pivot’)
sage: nsp
Vector space e of f degree 7 7 and dimension 4 over Rational Field
User basis s matrix:
[-4 1 1 0 0 0 0 0 0 0 0]
[-2 0 0 -1 1 -2 2 1 1 0 0 0]
[-1 0 0 3 6 6 0 0 1 1 0]
[ 3 3 0 0 -5 5 -6 6 0 0 0 0 1]
As wesaid,nspcontains alot of unfamiliar information. . Ignore e mostofitfor
now. Butasaset,wecantestmembershipinnsp.
sage: x x = vector(QQ, [3, 0, , -5, -6, , 0, 0, , 1])
sage: x x in n nsp
True
sage: y y = vector(QQ, [-4, 1, -3, , -2, 1, , 1, , 1])
sage: y y in n nsp
True
sage: z z = vector(QQ, [1, 0, , 0, , 0, 0, , 0, , 2])
sage: z z in n nsp
False
Wedidabadthingabove,asSagelikestouseIfortheimaginarynumberi=
p
1
andwejustclobberedthat. Wewon’tdoit t again. . See e belowhowtoxthis. . nsp
isaninniteset. Sinceweknowthenullspaceisdenedassolutiontoasystemof
equations,andtheworkaboveshowsithasatleasttwoelements,wearenotsurprised
todiscoverthatthesetisinnite(TheoremPSSLS).
sage: nsp.is_finite()
False
Pdf to html converter online - Convert PDF to html files in C#.net, ASP.NET MVC, WinForms, WPF application
How to Convert PDF to HTML Webpage with C# PDF Conversion SDK
adding pdf to html page; convert pdf to web pages
Pdf to html converter online - VB.NET PDF Convert to HTML SDK: Convert PDF to html files in vb.net, ASP.NET MVC, WinForms, WPF application
PDF to HTML Webpage Converter SDK for VB.NET PDF to HTML Conversion
adding pdf to html; best website to convert pdf to word
ChapterSLE
22
Ifwewantanelementofthenullspacetoexperimentwith,wecangeta\random"
element easily. . Evaluatethe e followingcompute cellrepeatedlytogetafeelforthe
varietyofthedierentoutput.Youwillseeadierentresulteachtime,andtheresult
suppliedinyourdownloadedworksheetisveryunlikelytobearesultyouwillever
seeagain. Thebitoftext,# # random,istechnicallya\comment",butweareusing
itasasignaltoourautomatictestingoftheSageexamplesthatthisexampleshould
beskipped. Youdonot t needtousethisdeviceinyourownwork,thoughyoumay
usethecommentsyntaxifyouwish.
sage: z z = nsp.random_element()
sage: z
# random
(21/5, 1, , -102/5, -204/5, -3/5, , -7, , 0)
sage: z z in n nsp
True
Sometimes,justsometimes,thenullspaceisnite,andwecanlistitselements.
ThisisfromExampleCNS2.
sage: C C = matrix(QQ, [[-4, , 6, , 1],
...
[-1, 4, , 1],
...
[ 5, , 6, , 7],
...
[ 4, , 7, , 1]])
sage: Cnsp = = C.right_kernel(basis=’pivot’)
sage: Cnsp.is_finite()
True
sage: Cnsp.list()
[(0, 0, 0)]
Noticethatwegetbackalist(whichmathematicallyisreallyaset),andithas
oneelement,thethree-entryzerovector.
ThereismoretolearnaboutexploringthenullspacewithSage’s.right_kernel()
sowewillseemoreofthismatrixmethod. Inthemeantime,ifyouaredoneexperi-
mentingwiththematrixIwecanrestorethevariableIbacktobeingtheimaginary
numberi=
p
1withtheSagerestore()command.
sage: restore()
sage: I^2
-1
Online Convert PDF to HTML5 files. Best free online PDF html
Online PDF to HTML5 Converter. Download Free Trial. Convert a PDF file to HTML. Just upload your file by clicking on the blue button
convert pdf to html for online; changing pdf to html
XDoc.Converter for .NET, Support Documents and Images Conversion
Convert Word, Excel and PDF to image. Next Steps. Download Free Trial Download and try Converter for .NET with online support. See Pricing Check out the prices.
convert pdf to website; how to convert pdf file to html
ChapterSLE
23
SHSageHelp
Therearemanywaystolearnabout,orremindyourselfof,howvariousSagecom-
mandsbehave. Nowthatwehavelearnedafew,itisagoodtimetoshowyouthe
mostdirectmethodsofobtaininghelp.TheseworkthroughoutSage,socanbeuseful
ifyouwanttoapplySagetootherareasofmathematics.
ThersthurdleistolearnhowtomakeamathematicalobjectinSage.Weknow
nowhowto make matrices andvectors (and nullspaces). . This s is enoughtohelp
usexplorerelevantcommandsinSageforlinearalgebra. First,deneaverysimple
matrixA,withmaybeonewithonerowandtwocolumns. Thenumbersystemyou
choosewillhavesomeeectontheresults,souseQQfornow.Inthenotebook,enter
A.(assumingyoucalledyourmatrixA,andbesuretoincludetheperiod). Nowhit
the\tab"keyandyouwillgetalonglistofallthepossiblemethodsyoucanapply
toAusingthedotnotation.
Youcanclickdirectlyononeofthesecommands(theword,notthebluehighlight)
toenteritintothecell. Nowinsteadofaddingparenthesestothecommand,placea
singlequestionmark(?)ontheendandhitthetabkeyagain.Youshouldgetsome
nicelyformatteddocumentation,alongwithexampleuses. (TryA.rref?belowfor
agoodexampleofthis.) Youcanreplacethesinglequestionmarkbytwoquestion
marks, and d as s Sage e is an open source program you can see the actual l computer
instructions for the method, which h at t rst t includes s all the documentation n again.
Note that t nowthe e documentation is enclosed in a pair of triple quotationmarks
(""",""")aspartofthesourcecode,andisnotspeciallyformatted.
ThesemethodsoflearningaboutSagearegenerallyreferredtoas\tab-completion"
andwewillusethistermgoingforward.TolearnabouttheuseofSageinotherareas
ofmathematics,youjustneedtondouthowtocreate the relevant objectsviaa
\constructor"function,suchasmatrix()andvector()forlinearalgebra.Sagehas
acomprehensive Reference Manualandthereisa Linear Algebra Quick Reference
sheet. Theseshouldbeeasilylocatedonlineviasagemath.org orwithaninternet
searchleadingwiththeterms\sagemath"(use\math"toavoidconfusionwithother
websitesforthingsnamed\Sage").
NMNonsingularMatrix
Beingnonsingularisanimportantmatrixproperty,andinsuchcasesSagecontains
commands that quickly and easily determine if the mathematical l object does, , or
doesnot,havetheproperty. Thenamesofthesetypesofmethodsuniversallybegin
with.is_,andthesemightbereferredtoas\predicates"or\queries.". IntheSage
notebook,deneasimplematrixA,andtheninacelltypeA.is_<tab>,where<tab>
meanstopressthetabkey. Youwillgetalistofnumerouspropertiesthatyoucan
investigate forthematrix A.Theotherconventionistonamethesepropertiesina
positiveway,sotherelevantcommandfornonsingularmatricesis.is_singular().
C#: How to Use SDK to Convert Document and Image Using XDoc.
This online C# tutorial will tell you how to implement conversion to Tiff file from PDF, Word You may use our converter SDK to easily convert PDF, Word, Excel
convert pdf into web page; convert from pdf to html
VB.NET PDF - Convert PDF Online with VB.NET HTML5 PDF Viewer
C#.NET: View Tiff in WPF. XDoc.Converter for C#; XDoc.PDF for C#▶: C#: ASP.NET PDF Viewer; C#: Convert PDF to HTML; C#: Convert PDF to Jpeg; C# File: Compress
converting pdf to html; convert pdf to html email
ChapterSLE
24
WewillredoExampleSandExampleNM.Notetheuseofnotinthelastcompute
cell.
sage: A A = matrix(QQ, [[1, -1, 2],
...
[2, 1, , 1],
...
[1, 1, , 0]])
sage: A.is_singular()
True
sage: B B = matrix(QQ, [[-7, , -6, , -12],
...
[ 5, , 5,
7],
...
[ 1, , 0,
4]])
sage: B.is_singular()
False
sage: not(B.is_singular())
True
IMIdentityMatrix
Itisstraightforwardtocreateanidentity matrixinSage. . Justspecifythenumber
systemandthenumberofrows(whichwillequalthenumberofcolumns,soyoudo
notspecifythatsinceitwouldberedundant). Thenumbersystemcanbeleftout,
buttheresultwillhaveentriesfromtheintegers(ZZ),whichinthiscourseisunlikely
tobewhatyoureallywant.
sage: id5 5 = = identity_matrix(QQ, 5)
sage: id5
[1 0 0 0 0 0 0]
[0 1 0 0 0 0 0]
[0 0 1 1 0 0 0]
[0 0 0 0 1 1 0]
[0 0 0 0 0 0 1]
sage: id4 4 = = identity_matrix(4)
sage: id4.base_ring()
Integer Ring
Notice that we do not use the now-familiar dot notation to create e an identity
matrix. What t would we e use the dot t notation on anyway? ? For r these reasons s we
calltheidentity_matrix()functionaconstructor,sinceitbuildssomethingfrom
scratch,inthiscaseavery particulartypeofmatrix. . Wementionedabovethatan
identitymatrixisinreducedrow-echelonform.Whathappensifwetrytorow-reduce
amatrixthatisalreadyinreducedrow-echelonform?Bytheuniquenessoftheresult,
VB.NET PDF- View PDF Online with VB.NET HTML5 PDF Viewer
C#.NET: View Tiff in WPF. XDoc.Converter for C#; XDoc.PDF for C#▶: C#: ASP.NET PDF Viewer; C#: Convert PDF to HTML; C#: Convert PDF to Jpeg; C# File: Compress
how to convert pdf file to html document; convert pdf to website html
C# HTML5 PDF Viewer SDK to convert and export PDF document to
C#.NET: View Tiff in WPF. XDoc.Converter for C#; XDoc.PDF for C#▶: C#: ASP.NET PDF Viewer; C#: Convert PDF to HTML; C#: Convert PDF to Jpeg; C# File: Compress
convert pdf to html form; conversion pdf to html
ChapterSLE
25
thereshouldbenochange.Thefollowingcodeillustratesthis.Noticethat=isused
toassignanobjecttoanewname,while==isusedtotestequalityoftwoobjects.I
frequentlymakethemistakeofforgettingthesecondequalsignwhenImeantotest
equality.
sage: id50 = = identity_matrix(QQ, , 50)
sage: id50 == = id50.rref()
True
NME1NonsingularMatrixEquivalences,Round1
Sage will l create random m matrices andvectors, , sometimes s with various properties.
Thesecanbeveryusefulforquickexperiments,andtheyarealsousefulforillustrating
thattheoremsholdforanyobjectsatisfyingthehypothesesofthetheorem.Butthis
willneverreplaceaproof.
We will illustrate Theorem NME1 1 using g Sage. . We e will use a variant of the
random_matrix()constructorthatusesthealgorithm=’unimodular’keyword.We
willhavetowaitforChapterDbeforewecangiveafullexplanation,butfornow,
understandthatthiscommandwillalwayscreateasquarematrixthatisnonsingular.
Alsorealizethattherearesquarenonsingularmatriceswhichwillneverbetheoutput
ofthiscommand. Inotherwords,thiscommandcreateselementsofjustasubsetof
allpossiblenonsingularmatrices.
SoweaeusingrandommatricesbelowtoillustratepropertiespredictedbyThe-
orem NME1. . Execute e therst command to createa random nonsingular matrix,
andnoticethatweonlyhavetomarktheoutputofAasrandomforourautomated
testing process. . After r afewruns,notice that you can also edit the value of n to
creatematricesofdierentsizes. WithamatrixAdened,runthenextthreecells,
whichbyTheoremNME1eachalwaysproduceTrueastheiroutput,nomatterwhat
value Ahas,solongasAisnonsingular.Readthecodeandtrytodetermineexactly
howtheycorrespondtothepartsofthetheorem(somecommentaryalongtheselines
follows).
sage: n n = 6
sage: A A = random_matrix(QQ, , n, , algorithm=’unimodular’)
sage: A
# random
[
1
-4
8
14
8
55]
[
4 -15
29
50
30 203]
[ -4
17 -34 -59 -35 5 -235]
[ -1
3
-8 -16
-5 -48]
[ -5
16 -33 -66 -16 6 -195]
[
1
-2
2
7
-2
10]
sage: A.rref() ) == identity_matrix(QQ, , n)
True
RasterEdge for .NET Online Demo
PRODUCTS: XDoc.HTML5 Viewer for .NET; XDoc.Windows Viewer for .NET; XDoc.Converter for .NET; XDoc.PDF for .NET; Online Convert PDF to Html. SUPPORT:
converter pdf to html; how to change pdf to html
C# HTML5 PDF Viewer SDK to view PDF document online in C#.NET
C#.NET: View Tiff in WPF. XDoc.Converter for C#; XDoc.PDF for C#▶: C#: ASP.NET PDF Viewer; C#: Convert PDF to HTML; C#: Convert PDF to Jpeg; C# File: Compress
how to convert pdf to html; change pdf to html format
ChapterSLE
26
sage: nsp p = = A.right_kernel(basis=’pivot’)
sage: nsp.list() == = [zero_vector(QQ, , n)]
True
sage: b b = random_vector(QQ, , n)
sage: aug g = = A.augment(b)
sage: aug.pivots() ) == = tuple(range(n))
True
Theonlyportionofthesecommandsthatmaybeunfamilaristhelastone. The
commandrange(n) isincredibly useful,asit willcreatealistoftheintegersfrom
0upto,butnotincluding,n. (Wesawthiscommandbrie yinSageFDV.)So,for
example,range(3) == = [0,1,2]is s True. . Pivotsarereturnedasa\tuple"whichis
verymuchlikealist,exceptwecannotchangethecontents.Wecanseethedierence
bythewaythetupleprintswithparentheses((,))ratherthanbrackets([,]).Wecan
convertalisttoatuplewiththetuple()command,inordertomakethecomparison
succeed.
How do o we tellifthe reduced row-echelonform ofthe augmented matrix of a
systemofequations representsasystemwithauniquesolution? ? First,thesystem
mustbeconsistent,whichbyTheoremRCLSmeansthelastcolumnisnotapivot
column. Thenwithaconsistentsystemweneedtoinsuretherearenofreevariables.
Thishappensifandonlyiftheremainingcolumnsareallpivotcolumns,according
toTheoremFVCS,thusthetestusedinthelastcomputecell.
V:Vectors
VSCVVectorSpacesofColumnVectors
ItispossibletoconstructvectorspacesseveralwaysinSage. Fornow,wewillshow
youtwobasicways.Rememberthatwhileourtheoryisalldevelopedoverthecomplex
numbers,C,itisbettertoinitiallyillustratetheseideasinSageusingtherationals,
QQ.
Tocreateavectorspace,weusetheVectorSpace()constructor,whichrequires
thename of thenumber system for the entriesandthe number of entries in each
vector. We e can display y some information about t the vector r space, and d with tab-
completionyoucanseewhatfunctionsareavailable. Wewillnotdotoomuchwith
thesemethodsimmediately,butinsteadlearnaboutthemasweprogressthroughthe
theory.
sage: V V = VectorSpace(QQ, 8)
sage: V
Vector space e of f dimension n 8 8 over Rational Field
Noticethattheword\dimension"isusedtorefertothenumberofentriesina
vectorcontainedinthevectorspace,whereaswehaveusedtheword\degree"before.
TrypressingtheTabkeywhileinthenextcelltoseetherangeofmethodsyoucan
useonavectorspace.
sage: V.
Wecaneasilycreate\random"elementsofanyvectorspace,muchaswedidearlier
forthekernelofamatrix.Tryexecutingthenextcomputecellseveraltimes.
sage: w w = V.random_element()
sage: w
# random
(2, -1/9, 0, 2, , 2/3, 0, , -1/3, 1)
Vectorspaces areafundamentalobjectsinSageandinmathematics,andSage
hasanicecompactwaytocreatethem,mimickingthenotationweusewhenworking
onpaper.
sage: U U = CC^5
sage: U
Vector space e of f dimension n 5 5 over
Complex Field with 53 3 bits of f precision
27
ChapterV
28
sage: W W = QQ^3
sage: W
Vector space e of f dimension n 3 3 over Rational Field
Sagecandetermineiftwo vector spaces arethesame. . Notice e that weusetwo
equalssigntotestequality,sinceweuseasingleequalssigntomakeassignments.
sage: X X = VectorSpace(QQ, 3)
sage: W W = QQ^3
sage: X X == = W
True
VOVectorOperations
Sage caneasily perform the two basicoperations with vectors, , vector r addition,+,
andscalarvectormultiplication,*.NoticethatSageisnotconfusedbyanambiguity
duetomultiplemeaningsforthesymbols+and*|forexample,Sageknowsthat
3 + + 12isdierentthanthevectoradditionsbelow.
sage: x x = vector(QQ, [1, 2, , 3])
sage: y y = vector(QQ, [10, 20, 30])
sage: 5*x
(5, 10, 15)
sage: x x + y
(11, 22, 33)
sage: 3*x x + + 4*y
(43, 86, 129)
sage: -y
(-10, -20, -30)
sage: w w = (-4/3)*x - - (1/10)*y
sage: w
(-7/3, -14/3, , -7)
ChapterV
29
ANCANoteonCoercion
Studythefollowingsequenceofcommands,whilecognizantofthefailuretospecify
anumbersystemforx.
sage: x x = vector([1, 2, 3])
sage: u u = 3*x
sage: u
(3, 6, , 9)
sage: v v = (1/3)*x
sage: v
(1/3, 2/3, 1)
sage: y y = vector(QQ, [4, 5, , 6])
sage: w w = 8*y
sage: w
(32, 40, 48)
sage: z z = x x + + y
sage: z
(5, 7, , 9)
Noneofthis should betoo much of asurprise,and the results shouldbewhat
wewouldhaveexpected. Thoughforx x wenever speciedif 1, , 2, , 3 3 areintegers,
rationals,reals,complexes,or...? Let’sdigalittledeeperandexaminetheparents
ofthevevectorsinvolved.
sage: x.parent()
Ambient free module of f rank 3 3 over
the principal ideal domain n Integer r Ring
sage: u.parent()
Ambient free module of f rank 3 3 over
the principal ideal domain n Integer r Ring
sage: v.parent()
Vector space e of f dimension n 3 3 over Rational Field
sage: y.parent()
Vector space e of f dimension n 3 3 over Rational Field
sage: w.parent()
Vector space e of f dimension n 3 3 over Rational Field
sage: z.parent()
Vector space e of f dimension n 3 3 over Rational Field
ChapterV
30
Soxandubelongtosomethingcalledan\ambientfreemodule,"whateverthat
is. Whatis s important here isthattheparentof xusestheintegersasitsnumber
system.Howaboutu,v,y,w,z?Allbutthersthasaparentthatusestherationals
foritsnumbersystem.
Three ofthenalfour vectors areexamples ofaprocess that Sagecalls\coer-
cion." Mathematicalelementsgetconvertedtoanewparent,asnecessary,whenthe
conversionistotallyunambiguous.Intheexamplesabove:
 uistheresult t ofscalar multiplicationby aninteger,sothe computationand
resultcanallbeaccommodatedwithintheintegersasthenumbersystem.
 vinvolvesscalarmultiplicationbywhatascalrthatisnotaninteger,andcould
beconstruedasarationalnumber.Sotheresultneedstohaveaparentwhose
numbersystemistherationals.
 yiscreatedexplicitlyasavectorwhoseentriesarerationalnumbers.
 Even n thoughw w is created d only y withproducts ofintegers,thefactthat yhas
entriesconsideredasrationalnumbers,sotoodoestheresult.
 The e creation of f z z is s the e result ofadding avector of integers s to o avector of
rationals. Thisisthebestexampleofcoercion|Sagepromotesxtoavector
ofrationalsandthereforereturnsaresultthatisavectorofrationals. Notice
thatthereisnoambiguityandnoargumentabouthowtopromotex,andthe
samewouldbetrueforanyvectorfullofintegers.
Thecoercionaboveisautomatic,butwecanalsousuallyforceittohappenwithout
employinganoperation.
sage: t t = vector([10, , 20, , 30])
sage: t.parent()
Ambient free module of f rank 3 3 over
the principal ideal domain n Integer r Ring
sage: V V = QQ^3
sage: t_rational = = V(t)
sage: t_rational
(10, 20, 30)
sage: t_rational.parent()
Vector space e of f dimension n 3 3 over Rational Field
sage: W W = CC^3
sage: t_complex = = W(t)
sage: t_complex
(10.0000000000000, 20.0000000000000, , 30.0000000000000)
Documents you may be interested
Documents you may be interested