O'Reilly logo

The Manga Guide to Linear Algebra by Ltd. Trend-Pro Co., Iroha Inoue, Shin Takahashi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Functions 35
Functions
I thought we'd talk
about functions
and their related
concepts next.
It's a prey
abstract, but you'
be fine as long as
you take your time
and think hard about
each new idea.
Got it.
Let's start by
defining the
co nce pt its elf.
Sounds
gd.
Functions
36 Chapter 2 The Fundamentals
Imagine the
foowing
scenario:
Captain Ichinose, in
a pleasant md,
decides to treat us
freshmen to lunch.
So we foow him
torestaurant A.
This is the
resta urant
menu.
Udon 500 yen Cuy 700 yen
Breaded pork
1000 yen
Broiled l
1500 yen
But there is
a catch,
ofcourse.
What
do you
mean?
Since he's the one paying,
he gets a say in any and
a orders.
Kind of
like this:
Foow
me!
?
Functions 37
We wouldn't reay be able to say no if he
told us to order the cheapest dish, right?
Or say, if he just told us a to order
dierent things.
Yurino
Yoshida
Yajima
Tomiyama
Udon
Cuy
Breaded pork
Broiled l
Udon for
everyone!
Yurino
Yoshida
Yajima
Tomiyama
Udon
Cuy
Breaded pork
Broiled l
Order
dierent
stu!
38 Chapter 2 The Fundamentals
Even if he told us to order our favorites,
we wouldn't reay have a choice. This might
make us the most hay, but that doesn't
change the fact that we have to obey him.
You could say that the captain's ordering
guidelines are like a “rule” that binds
elements of X to elements of Y.
Yurino
Yoshida
Yajima
Tomiyama
Udon
Cuy
Breaded pork
Broiled l
Order what
you want!
Yurino
Yoshida
Yajima
Tomiyama
Udon
Cuy
Breaded
pork
Broiled l
Rule!
?
?
?
?
X
Y
Functions 39
And that
is why...
We define a “function from
X to Y ” as the rule
that binds elements in X to elements in Y,
justlike the captain’s rules for how we
orderlunch!
This is how
wewrite it:
f is completely
arbitrary. g or h
would do just
aswe.
Gotcha.
Functions
A rule that binds elements of the set X to elements of the set Y is called “a
function from X to Y.X is usually called the domain and Y the co-domain or
target set of the function.
function!
or
Menu
Rule
Club
member
Menu
Club
member
!
Ruleor

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required