The Manga Guide LINEAR ALGEBRA - No Starch

Transcription

Th e M a n g a G u i de to LINEARALGEBRAShin TakahashiIroha InoueTREND-PRO Co., Ltd.Comicsinside!

2The Fundamentals

97You'vegot toknow yourbasics!9899GghhpWh um100 Ddone!You wish! Afteryou're done with thepushups, I want youto start on yourlegs! That meanssquats! Go go go!Hey.I thoughtwe'd start offwith.Are youokay?Reiji, youseem pretty outof it today.22Chapter 2I-I'll be fine.take a lookat thi—

R r r r u m b leAh—Sorry,I guess Icould use asnack.Don'tworry, pushingyour bodythat hard has itsconsequences.Just give mefive minutes.Well then,let's begin.Omn omn omI don't mind.take yourtime.Take a lookat this.The Fundamentals 23

I took the libertyof making adiagram of whatwe're going to betalking about.BasicsCourse tionsI thought today we'dstart on all the basicmathematics needed tounderstand linear algebra.Wow!VectorsEigenvalues andeigenvectorsCourse layoutFundamentalsMatricesWe'll start offslow and build ourway up to the moreabstract parts,okay?VectorsDon't worry,you'll be fine.Sure.24Chapter 2The Fundamentals

Number SystemsComplex numbersComplex numbers are written in the forma b·iwhere a and b are real numbers and i is the imaginary unit, defined as i 1.RealnumbersImaginarynumbersRational numbers*(not integers)Irrationalnumbers 0 Terminatingdecimal numberslike 0.3 Negativenaturalnumbers Non-terminatingdecimal numberslike 0.333. Numbers like and 2 whosedecimals do notfollow a patternand repeatforeverIntegers Positive natural numbers Complex numbers withouta real component, like0 bi, whereb is a nonzeroreal number* Numbers that can be expressed in the form q / p (where q and p areintegers, and p is not equal to zero) are known as rational numbers.Integers are just special cases of rational numbers.Let's talkabout numbersystems first.They're organizedlike this.Complexnumbers.I'venever reallyunderstood themeaning of i.I don't knowfor sure, but Isuppose somemathematician madeit up because hewanted to solveequations like?x2 5 0Well.Number Systems25

So.Using this new symbol, thesepreviously unsolvable problemssuddenly became approachable.Why would you want tosolve them in the firstplace? I don't reallysee the point.I understand whereyou're coming from,but complex numbersappear prettyfrequently in a varietyof areas.26Chapter 2The FundamentalsSighI'll just haveto get usedto them, Isuppose.Don't worry! I think it'dbe better if we avoidedthem for now since theymight make it harder tounderstand the reallyimportant parts.Thanks!

Implication and EquivalencePropositionsI thoughtwe'd talk aboutimplication next.But first,let’s discusspropositions.A proposition is a declarativesentence that is either trueor false, like.“That is eithertrue or false."“one plus one equals two” or“japan's population does notexceed 100 people.”0 10UmmLet's look at afew examples.A sentence like“Reiji Yurino is male”is a proposition.“Reiji Yurinois female”is also aproposition,by the way.TT T TBut a sentencelike “Reiji Yurino ishandsome” is not.My momsays I’mthe mosthandsomeguy inschool.TF T FTo put it simply,ambiguous sentencesthat produce differentreactions dependingon whom you ask arenot propositions.T FThat kind ofmakes sense.Implication and Equivalence27

ImplicationLet's try to apply this knowledgeto understand the concept ofimplication. The statement“If this dish is a schnitzelthen it contains pork”Yeah.is always true.Pigs ’feet!But if we look at its Converse.“If this dish contains porkthen it is a schnitzel”.it is no longer necessarily true.In situations wherewe know that “If Pthen Q” is true, butdon't know anythingabout its converse“If Q then P ”.It is aschnitzelNnece otsstr arilueyTrueChapter 2we say that “P entails Q” and that“Q could entail P.”It is a schnitzelIt contains porkEntailsCould entailIt contains porkIt is a schnitzelIt containsporkWhen a proposition like“If P then Q” is true, it iscommon to write it withthe implication symbol,like this:P Q28I hopenot!The FundamentalsIf P then QThis is aschnitzelThis dishcontains porkI think Iget it.

EquivalenceThat is, P Qas well as Q P,If both “If P then Q”and “If Q then P ”are true,Then P and Q are equivalent.Don’t worry.You’re due fora growthspurt.Exactly!It's kind oflike this.Tetsuo istaller thanReiji.Reiji isshorter thanTetsuo.So it’s like theimplication symbolspoint in bothdirections at thesame time?And this is thesymbol forequivalence.Reiji is shorter than Tetsuo.Allright.Tetsuo is taller than Reiji.Implication and Equivalence29

Set TheoryOh yeah.I thinkwe covered thatin high school.SetsProbably, butlet's review itanyway.Anotherimportant fieldof mathematics isset theory.SlideJust as you might think,a set is a collectionof things.The things thatmake up the set arecalled its elementsor objects.Hehe,okay.This mightgive you agood idea ofwhat I mean.30Chapter 2The Fundamentals

Example 1The set “Shikoku,” which is the smallest of Japan’s four islands, consists ofthese four elements: okushimaEhimeKouchiExample 2The set consisting of all even integers from 1 to 10 contains these fiveelements: 2468101. A Japanese ken is kind of like an American state.Set Theory31

Set Symbolse n nu m b e r sA ll eve n 1 an d 1 0ewtebTo illustrate, the setconsisting of alleven numbers between1 and 10 would looklike this:Theseare twocommonways towrite outthat set:It's alsoconvenient togive the seta name, forexample, X.Mmm.With that in mind,our definitionnow lookslike this:X marksthe set!This is a good way to expressthat “the element x belongsto the set X.”For example,Ehime-ken32 Chapter 2Okay.Shikoku

SubsetsAnd thenthere aresubsets.Let's say that allelements of a set Xalso belong to aset Y.Set enSet Y(Japan)X is a subset of ata-kenToyama-kenIshikawa-kenFukui-kenAnd it'swritten yama-kenHiroshima-kenYamaguchi-kenFukuoka-kenin this zaki-kenKagoshima-kenOkinawa-kenI see.For example,ShikokuJapanSet Theory33

Example 1Suppose we have two sets X and Y:X { 4, 10 }Y { 2, 4, 6, 8, 10 }X is a subset of Y, since all elements in Xalso exist in Y.Example 2Suppose we switch the sets:X { 2, 4, 6, 8, 10 }Y { 4, 10 }Since all elements in X don’t exist in Y,X is no longer a subset of Y.Example 3Suppose we have two equal sets instead:X { 2, 6, 10 }Y { 4, 8 }In this case neither X nor Y is a subset ofthe other.I think we'reabout halfwaydone for today.Are you stillhanging in there?34Chapter 2The Fundamentals610X268X8Y410Y2 4 68 10In this case, both sets are subsets of eachother. So X is a subset of Y, and Y is a subset of X.Suppose we have the two following sets:24X { 2, 4, 6, 8, 10 }Y { 2, 4, 6, 8, 10 }Example 4YXX2610Y48You know it!

FunctionsI thought we'd talkabout functionsand their relatedconcepts next.Fu n cti o nsIt's all prettyabstract, but you'llbe fine as long asyou take your timeand think hard abouteach new idea.Got it.Let's start bydefining theconcept itself.Soundsgood.Functions35

Imagine thefollowingscenario:Captain Ichinose, ina pleasant mood,decides to treat usfreshmen to lunch.So we follow himto restaurant A.Followme!This is therestaurantmenu.Udon 500 yenBut there isa catch,of course.Curry 700 yenBreaded pork1000 yenSince he's the one paying,he gets a say in any andall orders.Kind oflike this:?Whatdo youmean?36Chapter 2The FundamentalsBroiled eel1500 yen

We wouldn't realLy be able to say no if hetold us to order the cheapest dish, right?Udon foreveryone!YurinoUdonCurRyYoshidaYajimaBreaded porkTomiyamaBroiled eElOr say, if he just told us alL to orderdifFerent ajimaBreaded porkTomiyamaBroiled eElFunctions37

Even if he told us to order our favorites,we wouldn't realLy have a choice. This mightmake us the most hapPy, but that doesn'tchange the fact that we have to obey him.Order whatyou want!YurinoUdonCurRyYoshidaYajimaBreaded porkTomiyamaBroiled eElYou could say that the captain's orderingguidelines are like a “rule” that bindselements of X to elements of a?Tomiyama38Chapter 2The FundamentalsBroiled eEl

And thatis why.function!!We define a “function from X to Y ” as the rulethat binds elements in X to elements in Y,just like the captain’s rules for how weorder lunch!This is howwe write it:orClubmemberRuleMenuorRuleClubmemberMenuf is completelyarbitrary. g or hwould do justas well.Gotcha.FunctionsA rule that binds elements of the set X to elements of the set Y is called “afunction from X to Y.” X is usually called the domain and Y the co-domain ortarget set of the function.Functions39

ImagesLet’s assume thatxi is an element ofthe set X.Next up areimages.Images?is called “x i 's image under f in Y.”The element in Y thatcorresponds to x iwhen put through f.xi 's imageunder fin YAlso,it's not uncommonto write “xi 's imageunder f in Y”.As f(x i).Okay!40Chapter 2The Fundamentals

And in our case.XfYurinoYUdonCurRyYoshidaBreaded porkYajimaBroiled eElTomiyamaI hope youlike udon!Like this:f (Yurino) udonf (Yoshida) broiled eelf (Yajima) breaded porkf (Tomiyama) breaded porkImageThis is the element in Y that corresponds to xi of the set X, when put throughthe function f.Functions41

By the way, do youremember this type offormula from your highschool years?Oh.yeah, sure.?Didn't you everwonder why.they always usedthis weird symbol f(x)where they could haveused something muchsimpler like y instead?“Like whatever!Anyways, so if I wantto substitute with 2in this formula,I'm supposed to writef(2) and.”M42Chapter 2The FundamentalsideIn s b r a i ns’isaActually.I have!

WhatWell,here’swhy.f(x) 2x 1really means is this:The function f is a rule that says:“The element x of the set Xgoes together with the element2x 1 in the set Y.”Oh!So that's whatit meant!Similarly,f(2) implies this:I think I'mstarting toget it.So we were usingfunctions in highschool too?The image of 2 under the function f is 2 2 1.Exactly.Functions43

Domain and RangefXOn tothe nextsubject.In thiscase.YurinoYUdonCurRyYoshidaYajimaBreaded porkTomiyamaBroiled eElWe're going to workwith a set{udon, breaded pork,broiled eel}UdonBroiledeelwhich is the image ofthe set X under thefunction f. *BreadedporkThis set is usually calledthe range of the function f,but it is sometimes alsocalled the image of f.Kind ofconfusing.44Chapter 2* The term image is used here to describe the set of elementsin Y that are the image of at least one element in X.

XYDomainco-DomainRangeAnd the set X is denotedas the domain of yamaCurRyWe could even have described this function asY { f (Yurino), f (Yoshida), f (Yajima), f (Tomiyama)}Hehe.if we wanted to.u!OssRange and Co-domainThe set that encompasses the function f ’s image { f(x1), f(x2), , f(xn)} iscalled the range of f, and the (possibly larger) set being mapped into is calledits co-domain.The relationship between the range and the co-domain Y is as follows:{ f(x1), f(x2), , f(xn)} YIn other words, a function’s range is a subset of its co-domain. In the special case where all elements in Y are an image of some element in X, we have{ f(x1), f(x2), , f(xn)} YFunctions 45

Onto and One-to-One FunctionsNext we’ll talkabout onto andone-to-onefunctions.Right.Let's say our karate clubdecides to have a practicematch with another club.HanamichiUniversityXUniversity AfYAnd that the captain’s mappingfunction f is “Fight that guy.”HanamichiUniversityXUniversity yamaUniversity CfN-not really.This is just anexample.You'realreadydoingpracticematches?Still workingon the basics!46Chapter 2YThe Fundamentals

Onto FunctionsHanamichiUniversityXUniversity ajimaYajimaTomiyamaTomiyamaUniversity BfYA function is onto if itsimage is equal to itsco-domain. This meansthat alL the elementsin the co-domain of anonto function are beingmapPed onto.One-to-One FunctionsHanamichiUniversityXUniversity ajimaYajimaTomiyamaTomiyamaUniversity CfYIf xi xj leads tof(xi) f(xj), we say thatthe function is oneto-one. This meansthat no element inthe co-domain can bemapPed onto morethan once.One-to-One and Onto ty AfYIt’s also posSible fora function to be bothonto and one-to-one.Such a function createsa “budDy system” betweEnthe elements of thedomain and co-domain.Each element has oneand only one “partner.”YajimaTomiyamaFunctions47

Inverse FunctionsHanamichiThis time we're Universitygoing to look atXthe other teamcaptain's ordersas well.Now wehave inversefunctions.University versityXfUniversity jimaYajimaTomiyamaTomiyamaUniversity AgYI see.We say that the function gis f 's inverse when the twocaptains' orders coincidelike this.48Chapter 2The Fundamentals

To specifyeven further.f is an inverse of gif these two relations hold.Oh, it’s like thefunctions undoeach other!This is the symbol used toindicate inverse functions.There is also aconnection betweenone-to-one and ontofunctions and inversefunctions. Have alook at this.You raise itto –1, right?The function fhas an inverse.The function fis one-to-oneand onto.orSo if it’s one-toone and onto, it hasan inverse, and

LINEAR ALGEBRA Shin Takahashi Iroha Inoue TREND-PRO Co., Ltd. The Manga Guide to Comics inside!