100% found this document useful (2 votes)
246 views88 pages

Mathematics For Machine Learning Marc Peter Deisenroth A Aldo Faisal Cheng Soon Ong PDF Download

The document discusses 'Mathematics for Machine Learning' by Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong, which serves as a comprehensive resource for understanding the mathematical foundations essential for machine learning. It covers key topics such as linear algebra, probability, and optimization, and applies these concepts to derive central machine learning methods like linear regression and support vector machines. The textbook includes worked examples, exercises, and programming tutorials to facilitate learning for both beginners and those with a mathematical background.

Uploaded by

srakahaanes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
246 views88 pages

Mathematics For Machine Learning Marc Peter Deisenroth A Aldo Faisal Cheng Soon Ong PDF Download

The document discusses 'Mathematics for Machine Learning' by Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong, which serves as a comprehensive resource for understanding the mathematical foundations essential for machine learning. It covers key topics such as linear algebra, probability, and optimization, and applies these concepts to derive central machine learning methods like linear regression and support vector machines. The textbook includes worked examples, exercises, and programming tutorials to facilitate learning for both beginners and those with a mathematical background.

Uploaded by

srakahaanes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 88

Mathematics For Machine Learning Marc Peter

Deisenroth A Aldo Faisal Cheng Soon Ong download

https://ebookbell.com/product/mathematics-for-machine-learning-
marc-peter-deisenroth-a-aldo-faisal-cheng-soon-ong-51710716

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Mathematics For Machine Learning 1st Edition Deisenroth Marc Peter

https://ebookbell.com/product/mathematics-for-machine-learning-1st-
edition-deisenroth-marc-peter-33114906

Mathematics For Machine Learning A Deep Dive Into Algorithms Nibedita


Sahu

https://ebookbell.com/product/mathematics-for-machine-learning-a-deep-
dive-into-algorithms-nibedita-sahu-52214850

Mathematics For Machine Learning Itebooks

https://ebookbell.com/product/mathematics-for-machine-learning-
itebooks-23836766

Mathematics Statistics For Machine Learning Govind Kumar

https://ebookbell.com/product/mathematics-statistics-for-machine-
learning-govind-kumar-51449500
Mathematics And Programming For Machine Learning With R From The
Ground Up William B Claster

https://ebookbell.com/product/mathematics-and-programming-for-machine-
learning-with-r-from-the-ground-up-william-b-claster-22143574

Mathematics And Programming For Machine Learning With R Claster

https://ebookbell.com/product/mathematics-and-programming-for-machine-
learning-with-r-claster-232891736

Practical Mathematics For Ai And Deep Learning A Concise Yet Indepth


Guide On Fundamentals Of Computer Vision Nlp Complex Deep Neural
Networks And Machine Learning Tamoghna Ghosh Shravan Kumar Belagal
Math
https://ebookbell.com/product/practical-mathematics-for-ai-and-deep-
learning-a-concise-yet-indepth-guide-on-fundamentals-of-computer-
vision-nlp-complex-deep-neural-networks-and-machine-learning-tamoghna-
ghosh-shravan-kumar-belagal-math-48845358

Practical Mathematics For Ai And Deep Learning A Concise Yet Indepth


Guide On Fundamentals Of Computer Vision Nlp Complex Deep Neural
Networks And Machine Learning Tamoghna Ghosh Shravan Kumar Belagal
Math
https://ebookbell.com/product/practical-mathematics-for-ai-and-deep-
learning-a-concise-yet-indepth-guide-on-fundamentals-of-computer-
vision-nlp-complex-deep-neural-networks-and-machine-learning-tamoghna-
ghosh-shravan-kumar-belagal-math-232354922

Mathematics For Machine Technology 8th Edition John C Peterson

https://ebookbell.com/product/mathematics-for-machine-technology-8th-
edition-john-c-peterson-11247014
Mathematics for Machine Learning
The fundamental mathematical tools needed to understand machine learning include
linear algebra, analytic geometry, matrix decompositions, vector calculus, optimiza-
tion, probability, and statistics. These topics are traditionally taught in disparate
courses, making it hard for data science or computer science students, or profes-
sionals, to efficiently learn the mathematics.
This self-contained textbook bridges the gap between mathematical and machine
learning texts, introducing the mathematical concepts with a minimum of prerequi-
sites. It uses these concepts to derive four central machine learning methods: linear
regression, principal component analysis, Gaussian mixture models, and support
vector machines. For students and others with a mathematical background, these
derivations provide a starting point to machine learning texts. For those learning
the mathematics for the first time, the methods help build intuition and practical
experience with applying mathematical concepts.
Every chapter includes worked examples and exercises to test understanding. Pro-
gramming tutorials are offered on the book’s web site.

M a r c P e t e r D e i s e n r o t h is the DeepMind Chair in Artificial Intelligence at Uni-


versity College London. Prior to this, Marc was a faculty member at Imperial College
London. His research areas include data-efficient learning, probabilistic modeling,
and autonomous decision making. His research received Best Paper Awards at the
ICRA 2014 and the ICCAS 2016. Marc has been awarded the President’s Award for
Outstanding Early Career Researcher at Imperial College London, a Google Faculty
Research Award, and a Microsoft PhD grant.

A . A l d o F a i s a l leads the Brain & Behaviour Lab at Imperial College London,


where he is faculty at the Departments of Bioengineering and Computing and a
Fellow of the Data Science Institute. He is the director of the 20Mio£ United
Kingdom Research and Innovation (UKRI) Center for Doctoral Training in AI
for Healthcare. He obtained a PhD in computational neuroscience at Cambridge
University and became Junior Research Fellow in the Computational and Biological
Learning Lab. His research is at the interface of neuroscience and machine learning
to understand and reverse engineer brains and behavior.

C h e n g S o o n O n g is Principal Research Scientist at the Machine Learning


Research Group, Data61, CSIRO and Adjunct Associate Professor at the Australian
National University. His research focuses on enabling scientific discovery by
extending statistical machine learning methods. He received his PhD in computer
science at Australian National University in 2005. He has been a lecturer in the
Department of Computer Science at ETH Zürich, and has worked in the Diagnostic
Genomics Team at NICTA in Melbourne.
Mathematics for Machine
Learning

Marc Peter Deisenroth


University College London

A. Aldo Faisal
Imperial College London

Cheng Soon Ong


Data61, CSIRO
University Printing House, Cambridge CB2 8BS, United Kingdom

One Liberty Plaza, 20th Floor, New York, NY 10006, USA

477 Williamstown Road, Port Melbourne, VIC 3207, Australia

314–321, 3rd Floor, Plot 3, Splendor Forum, Jasola District Centre, New Delhi – 110025, India

79 Anson Road, #06–04/06, Singapore 079906

Cambridge University Press is part of the University of Cambridge.

It furthers the University’s mission by disseminating knowledge in the pursuit of


education, learning, and research at the highest international levels of excellence.

www.cambridge.org
Information on this title: www.cambridge.org/9781108470049
DOI: 10.1017/9781108679930

© Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong 2020

This publication is in copyright. Subject to statutory exception


and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without the written
permission of Cambridge University Press.

First published 2020

Printed in Singapore by Markono Print Media Pte Ltd

A catalogue record for this publication is available from the British Library.

Library of Congress Cataloging-in-Publication Data


Names: Deisenroth, Marc Peter, author. | Faisal, A. Aldo, author. | Ong, Cheng Soon, author.
Title: Mathematics for machine learning / Marc Peter Deisenroth, A. Aldo Faisal, Cheng Soon Ong.
Description: Cambridge ; New York, NY : Cambridge University Press, 2020. |
Includes bibliographical references and index.
Identifiers: LCCN 2019040762 (print) | LCCN 2019040763 (ebook) |
ISBN 9781108470049 (hardback) | ISBN 9781108455145 (paperback) | ISBN 9781108679930 (epub)
Subjects: LCSH: Machine learning–Mathematics.
Classification: LCC Q325.5 .D45 2020 (print) | LCC Q325.5 (ebook) | DDC 006.3/1–dc23
LC record available at https://lccn.loc.gov/2019040762
LC ebook record available at https://lccn.loc.gov/2019040763

ISBN 978-1-108-47004-9 Hardback


ISBN 978-1-108-45514-5 Paperback

Additional resources for this publication at https://mml-book.com.

Cambridge University Press has no responsibility for the persistence or accuracy


of URLs for external or third-party internet websites referred to in this publication
and does not guarantee that any content on such websites is, or will remain,
accurate or appropriate.
Contents

List of Symbols ix
Preface xi
Acknowledgments xv

Part I Mathematical Foundations

1 Introduction and Motivation 3


1.1 Finding Words for Intuitions 3
1.2 Two Ways to Read This Book 5
1.3 Exercises and Feedback 7

2 Linear Algebra 8
2.1 Systems of Linear Equations 10
2.2 Matrices 12
2.3 Solving Systems of Linear Equations 17
2.4 Vector Spaces 24
2.5 Linear Independence 29
2.6 Basis and Rank 33
2.7 Linear Mappings 36
2.8 Affine Spaces 48
2.9 Further Reading 50
Exercises 51

3 Analytic Geometry 57
3.1 Norms 58
3.2 Inner Products 59
3.3 Lengths and Distances 61
3.4 Angles and Orthogonality 63
3.5 Orthonormal Basis 65
3.6 Orthogonal Complement 65
3.7 Inner Product of Functions 66
3.8 Orthogonal Projections 67
3.9 Rotations 76
3.10 Further Reading 79
Exercises 80

v
vi Contents

4 Matrix Decompositions 82
4.1 Determinant and Trace 83
4.2 Eigenvalues and Eigenvectors 88
4.3 Cholesky Decomposition 96
4.4 Eigendecomposition and Diagonalization 98
4.5 Singular Value Decomposition 101
4.6 Matrix Approximation 111
4.7 Matrix Phylogeny 115
4.8 Further Reading 116
Exercises 118

5 Vector Calculus 120


5.1 Differentiation of Univariate Functions 122
5.2 Partial Differentiation and Gradients 126
5.3 Gradients of Vector-Valued Functions 129
5.4 Gradients of Matrices 135
5.5 Useful Identities for Computing Gradients 138
5.6 Backpropagation and Automatic Differentiation 138
5.7 Higher-Order Derivatives 143
5.8 Linearization and Multivariate Taylor Series 144
5.9 Further Reading 149
Exercises 150

6 Probability and Distributions 152


6.1 Construction of a Probability Space 152
6.2 Discrete and Continuous Probabilities 157
6.3 Sum Rule, Product Rule, and Bayes’ Theorem 163
6.4 Summary Statistics and Independence 165
6.5 Gaussian Distribution 175
6.6 Conjugacy and the Exponential Family 182
6.7 Change of Variables/Inverse Transform 191
6.8 Further Reading 197
Exercises 198

7 Continuous Optimization 201


7.1 Optimization Using Gradient Descent 203
7.2 Constrained Optimization and Lagrange Multipliers 208
7.3 Convex Optimization 211
7.4 Further Reading 220
Exercises 221

Part II Central Machine Learning Problems

8 When Models Meet Data 225


8.1 Data, Models, and Learning 225
8.2 Empirical Risk Minimization 232
Contents vii

8.3 Parameter Estimation 238


8.4 Probabilistic Modeling and Inference 244
8.5 Directed Graphical Models 249
8.6 Model Selection 254

9 Linear Regression 260


9.1 Problem Formulation 261
9.2 Parameter Estimation 263
9.3 Bayesian Linear Regression 273
9.4 Maximum Likelihood as Orthogonal Projection 282
9.5 Further Reading 283

10 Dimensionality Reduction with Principal Component Analysis 286


10.1 Problem Setting 286
10.2 Maximum Variance Perspective 289
10.3 Projection Perspective 293
10.4 Eigenvector Computation and Low-Rank Approximations 300
10.5 PCA in High Dimensions 302
10.6 Key Steps of PCA in Practice 303
10.7 Latent Variable Perspective 306
10.8 Further Reading 310

11 Density Estimation with Gaussian Mixture Models 314


11.1 Gaussian Mixture Model 315
11.2 Parameter Learning via Maximum Likelihood 316
11.3 EM Algorithm 325
11.4 Latent-Variable Perspective 328
11.5 Further Reading 332

12 Classification with Support Vector Machines 335


12.1 Separating Hyperplanes 337
12.2 Primal Support Vector Machine 338
12.3 Dual Support Vector Machine 347
12.4 Kernels 351
12.5 Numerical Solution 353
12.6 Further Reading 355

References 357
Index 367
List of Symbols

Symbol Typical meaning


a, b, c, α, β, γ Scalars are lowercase
x, y, z Vectors are bold lowercase
A, B, C Matrices are bold uppercase
x  , A Transpose of a vector or matrix
A−1 Inverse of a matrix
x, y Inner product of x and y
x y Dot product of x and y
B = (b1 , b2 , b3 ) (Ordered) tuple
B = [b1 , b2 , b3 ] Matrix of column vectors stacked horizontally
B = {b1 , b2 , b3 } Set of vectors (unordered)
Z, N Integers and natural numbers, respectively
R, C Real and complex numbers, respectively
Rn n-dimensional vector space of real numbers
∀x Universal quantifier: for all x
∃x Existential quantifier: there exists x
a := b a is defined as b
a =: b b is defined as a
a∝b a is proportional to b, i.e., a = constant · b
g◦f Function composition: “g after f ”
⇐⇒ If and only if
=⇒ Implies
A, C Sets
a∈A a is an element of the set A
∅ Empty set
D Number of dimensions; indexed by d = 1, . . . , D
N Number of data points; indexed by n = 1, . . . , N
Im Identity matrix of size m × m
0m,n Matrix of zeros of size m × n
1m,n Matrix of ones of size m × n
ei Standard/canonical vector (where i is the
component that is 1)
dim(V) Dimensionality of vector space V

ix
x List of Symbols

Symbol Typical meaning


rk(A) Rank of matrix A
Im(Φ) Image of linear mapping Φ
ker(Φ) Kernel (null space) of a linear mapping Φ
span[b1 ] Span (generating set) of b1
tr(A) Trace of A
det(A) Determinant of A
|·| Absolute value or determinant (depending on context)
· Norm; Euclidean unless specified
λ Eigenvalue or Lagrange multiplier
Eλ Eigenspace corresponding to eigenvalue λ
θ Parameter vector
∂f
∂x Partial derivative of f with respect to x
df
dx Total derivative of f with respect to x
∇ Gradient
L Lagrangian
L
  Negative log-likelihood
n
k Binomial coefficient, n choose k
VX [x] Variance of x with respect to the random variable X
EX [x] Expectation of x with respect to the random variable X
CovX,Y [x, y] Covariance between x and y.
X⊥ ⊥ Y |Z X is conditionally independent of Y given Z
X ∼ p  Random variable X is distributed according to p
N μ, Σ Gaussian distribution with mean μ and covariance Σ
Ber(μ) Bernoulli distribution with parameter μ
Bin(N, μ) Binomial distribution with parameters N, μ
Beta(α, β) Beta distribution with parameters α, β

List of Abbreviations and Acronyms

Acronym Meaning
e.g. Exempli gratia (Latin: for example)
GMM Gaussian mixture model
i.e. Id est (Latin: this means)
i.i.d. Independent, identically distributed
MAP Maximum a posteriori
MLE Maximum likelihood estimation/estimator
ONB Orthonormal basis
PCA Principal component analysis
PPCA Probabilistic principal component analysis
REF Row-echelon form
SPD Symmetric, positive definite
SVM Support vector machine
Preface

Machine learning is the latest in a long line of attempts to distill human


knowledge and reasoning into a form that is suitable for constructing machines
and engineering automated systems. As machine learning becomes more
ubiquitous and its software packages become easier to use, it is natural and
desirable that the low-level technical details are abstracted away and hidden
from the practitioner. However, this brings with it the danger that a practitioner
becomes unaware of the design decisions and, hence, the limits of machine
learning algorithms.
The enthusiastic practitioner who is interested to learn more about the magic
behind successful machine learning algorithms currently faces a daunting set of
prerequisite knowledge:
▪ Programming languages and data analysis tools
▪ Large-scale computation and the associated frameworks
▪ Mathematics and statistics and how machine learning builds on it
At universities, introductory courses on machine learning tend to spend early
parts of the course covering some of these prerequisites. For historical reasons,
courses in machine learning tend to be taught in the computer science depart-
ment, where students are often trained in the first two areas of knowledge, but
not so much in mathematics and statistics.
Current machine learning textbooks primarily focus on machine learning
algorithms and methodologies and assume that the reader is competent in math-
ematics and statistics. Therefore, these books only spend one or two chapters of
background mathematics, either at the beginning of the book or as appendices.
We have found many people who want to delve into the foundations of basic
machine learning methods who struggle with the mathematical knowledge
required to read a machine learning textbook. Having taught undergraduate
and graduate courses at universities, we find that the gap between high school
mathematics and the mathematics level required to read a standard machine
learning textbook is too big for many people.
This book brings the mathematical foundations of basic machine learning
concepts to the fore and collects the information in a single place so that this
skills gap is narrowed or even closed.

xi
xii Preface

Why Another Book on Machine Learning?


Machine learning builds upon the language of mathematics to express concepts
that seem intuitively obvious but that are surprisingly difficult to formalize.
Once formalized properly, we can gain insights into the task we want to solve.
One common complaint of students of mathematics around the globe is that the
topics covered seem to have little relevance to practical problems. We believe
that machine learning is an obvious and direct motivation for people to learn
mathematics.
This book is intended to be a guidebook to the vast mathematical literature
“Math is linked in the that forms the foundations of modern machine learning. We motivate the need
popular mind with for mathematical concepts by directly pointing out their usefulness in the context
phobia and anxiety.
of fundamental machine learning problems. In the interest of keeping the book
You’d think we’re
discussing short, many details and more advanced concepts have been left out. Equipped
spiders.” (Strogatz, with the basic concepts presented here, and how they fit into the larger context
2014, 281) of machine learning, the reader can find numerous resources for further study,
which we provide at the end of the respective chapters. For readers with a math-
ematical background, this book provides a brief but precisely stated glimpse of
machine learning. In contrast to other books that focus on methods and models
of machine learning (MacKay, 2003; Bishop, 2006; Alpaydin, 2010; Murphy,
2012; Barber, 2012; Shalev-Shwartz and Ben-David, 2014; Rogers and Girolami,
2016) or programmatic aspects of machine learning (Müller and Guido, 2016;
Raschka and Mirjalili, 2017; Chollet and Allaire, 2018), we provide only four
representative examples of machine learning algorithms. Instead, we focus on
the mathematical concepts behind the models themselves. We hope that readers
will be able to gain a deeper understanding of the basic questions in machine
learning and connect practical questions arising from the use of machine learning
with fundamental choices in the mathematical model.
We do not aim to write a classical machine learning book. Instead, our
intention is to provide the mathematical background, applied to four central
machine learning problems, to make it easier to read other machine learning
textbooks.

Who Is the Target Audience?


As applications of machine learning become widespread in society, we believe
that everybody should have some understanding of its underlying principles. This
book is written in an academic mathematical style, which enables us to be precise
about the concepts behind machine learning. We encourage readers unfamiliar
with this seemingly terse style to persevere and to keep the goals of each topic in
mind. We sprinkle comments and remarks throughout the text, in the hope that it
provides useful guidance with respect to the big picture.
The book assumes the reader to have mathematical knowledge commonly
covered in high school mathematics and physics. For example, the reader should
have seen derivatives and integrals before, and geometric vectors in two or three
dimensions. Starting from there, we generalize these concepts. Therefore, the
Preface xiii

target audience of the book includes undergraduate university students, evening


learners and learners participating in online machine learning courses.
In analogy to music, there are three types of interaction that people have with
machine learning:
Astute Listener The democratization of machine learning by the provision
of open-source software, online tutorials and cloud-based tools allows users to
not worry about the specifics of pipelines. Users can focus on extracting insights
from data using off-the-shelf tools. This enables non-tech-savvy domain experts
to benefit from machine learning. This is similar to listening to music; the user
is able to choose and discern between different types of machine learning, and
benefits from it. More experienced users are like music critics, asking important
questions about the application of machine learning in society such as ethics,
fairness and privacy of the individual. We hope that this book provides a founda-
tion for thinking about the certification and risk management of machine learning
systems and allows them to use their domain expertise to build better machine
learning systems.
Experienced Artist Skilled practitioners of machine learning can plug and
play different tools and libraries into an analysis pipeline. The stereotypical prac-
titioner would be a data scientist or engineer who understands machine learning
interfaces and their use cases and is able to perform wonderful feats of prediction
from data. This is similar to a virtuoso playing music, where highly skilled
practitioners can bring existing instruments to life and bring enjoyment to their
audience. Using the mathematics presented here as a primer, practitioners would
be able to understand the benefits and limits of their favourite method, and to
extend and generalize existing machine learning algorithms. We hope that this
book provides the impetus for more rigorous and principled development of
machine learning methods.
Fledgling Composer As machine learning is applied to new domains,
developers of machine learning need to develop new methods and extend existing
algorithms. They are often researchers who need to understand the mathematical
basis of machine learning and uncover relationships between different tasks. This
is similar to composers of music who, within the rules and structure of musical
theory, create new and amazing pieces. We hope this book provides a high-level
overview of other technical books for people who want to become composers of
machine learning. There is a great need in society for new researchers who are
able to propose and explore novel approaches for attacking the many challenges
of learning from data.
Acknowledgments

We are grateful to many people who looked at early drafts of the book and suf-
fered through painful expositions of concepts. We tried to implement their ideas
that we did not vehemently disagree with. We would like to especially acknowl-
edge Christfried Webers for his careful reading of many parts of the book, and his
detailed suggestions on structure and presentation. Many friends and colleagues
have also been kind enough to provide their time and energy on different versions
of each chapter. We have been lucky to benefit from the generosity of the online
community, who have suggested improvements via github.com, which greatly
improved the book.
The following people have found bugs, proposed clarifications and suggested
relevant literature, either via github.com or personal communication. Their
names are sorted alphabetically.

Abdul-Ganiy Usman Christopher Gray


Adam Gaier Daniel McNamara
Adele Jackson Daniel Wood
Aditya Menon Darren Siegel
Alasdair Tran David Johnston
Aleksandar Krnjaic Dawei Chen
Alexander Makrigiorgos Ellen Broad
Alfredo Canziani Fengkuangtian Zhu
Ali Shafti Fiona Condon
Amr Khalifa Georgios Theodorou
Andrew Tanggara He Xin
Angus Gruen Irene Raissa Kameni
Antal A. Buss Jakub Nabaglo
Antoine Toisoul Le Cann James Hensman
Areg Sarvazyan Jamie Liu
Artem Artemev Jean Kaddour
Artyom Stepanov Jean-Paul Ebejer
Bill Kromydas Jerry Qiang
Bob Williamson Jitesh Sindhare
Boon Ping Lim John Lloyd
Chao Qu Jonas Ngnawe
Cheng Li Jon Martin
Chris Sherlock Justin Hsi
xv
xvi Acknowledgments

Kai Arulkumaran Sandeep Mavadia


Kamil Dreczkowski Sarvesh Nikumbh
Lily Wang Sebastian Raschka
Lionel Tondji Ngoupeyou Senanayak Sesh Kumar Karri
Lydia Knüfing Seung-Heon Baek
Mahmoud Aslan Shahbaz Chaudhary
Mark Hartenstein Shakir Mohamed
Mark van der Wilk Shawn Berry
Markus Hegland Sheikh Abdul Raheem Ali
Martin Hewing Sheng Xue
Matthew Alger Sridhar Thiagarajan
Matthew Lee Syed Nouman Hasany
Maximus McCann Szymon Brych
Mengyan Zhang Thomas Bühler
Michael Bennett Timur Sharapov
Michael Pedersen Tom Melamed
Minjeong Shin Vincent Adam
Mohammad Malekzadeh Vincent Dutordoir
Naveen Kumar Vu Minh
Nico Montali Wasim Aftab
Oscar Armas Wen Zhi
Patrick Henriksen Wojciech Stokowiec
Patrick Wieschollek Xiaonan Chong
Pattarawat Chormai Xiaowei Zhang
Paul Kelly Yazhou Hao
Petros Christodoulou Yicheng Luo
Piotr Januszewski Young Lee
Pranav Subramani Yu Lu
Quyu Kong Yun Cheng
Ragib Zaman Yuxiao Huang
Rui Zhang Zac Cranko
Ryan-Rhys Griffiths Zijian Cao
Salomon Kabongo Zoe Nolan
Samuel Ogunmola

Contributors through github, whose real names were not listed on their github
profile, are the following:

SamDataMad insad empet


bumptiousmonkey HorizonP victorBigand
idoamihai cs-maillist 17SKYE
deepakiim kudo23 jessjing1995

We are also very grateful to Parameswaran Raman and the many anonymous
reviewers, organized by Cambridge University Press, who read one or more
Acknowledgments xvii

chapters of earlier versions of the manuscript, and provided constructive


criticism that led to considerable improvements. A special mention goes to
Dinesh Singh Negi, our LATEX support for detailed and prompt advice about
LATEX-related issues. Last but not least, we are very grateful to our editor Lauren
Cowles, who has been patiently guiding us through the gestation process of this
book.
Part I

Mathematical Foundations
1

Introduction and Motivation

Machine learning is about designing algorithms that automatically extract valu-


able information from data. The emphasis here is on “automatic,” i.e., machine
learning is concerned about general-purpose methodologies that can be applied
to many datasets, while producing something that is meaningful. There are three
concepts that are at the core of machine learning: data, a model, and learning.
Since machine learning is inherently data driven, data is at the core of machine data
learning. The goal of machine learning is to design general-purpose methodolo-
gies to extract valuable patterns from data, ideally without much domain-specific
expertise. For example, given a large corpus of documents (e.g., books in many
libraries), machine learning methods can be used to automatically find relevant
topics that are shared across documents (Hoffman et al., 2010). To achieve this
goal, we design models that are typically related to the process that generates model
data, similar to the dataset we are given. For example, in a regression setting,
the model would describe a function that maps inputs to real-valued outputs. To
paraphrase Mitchell (1997): A model is said to learn from data if its performance
on a given task improves after the data is taken into account. The goal is to find
good models that generalize well to yet unseen data, which we may care about
in the future. Learning can be understood as a way to automatically find patterns learning
and structure in data by optimizing the parameters of the model.
While machine learning has seen many success stories, and software is readily
available to design and train rich and flexible machine learning systems, we
believe that the mathematical foundations of machine learning are important
in order to understand fundamental principles upon which more complicated
machine learning systems are built. Understanding these principles can facilitate
creating new machine learning solutions, understanding and debugging existing
approaches, and learning about the inherent assumptions and limitations of the
methodologies we are working with.

1.1 Finding Words for Intuitions


A challenge we face regularly in machine learning is that concepts and words are
slippery, and a particular component of the machine learning system can be ab-
stracted to different mathematical concepts. For example, the word “algorithm”
is used in at least two different senses in the context of machine learning. In the
first sense, we use the phrase “machine learning algorithm” to mean a system that
makes predictions based on input data. We refer to these algorithms as predictor. predictor

3
4 Introduction and Motivation

In the second sense, we use the exact same phrase “machine learning algorithm”
to mean a system that adapts some internal parameters of the predictor so that
it performs well on future unseen input data. Here we refer to this adaptation as
training training a system.
This book will not resolve the issue of ambiguity, but we want to highlight
upfront that, depending on the context, the same expressions can mean different
things. However, we attempt to make the context sufficiently clear to reduce the
level of ambiguity.
The first part of this book introduces the mathematical concepts and foun-
dations needed to talk about the three main components of a machine learning
system: data, models, and learning. We will briefly outline these components
here, and we will revisit them again in Chapter 8 once we have discussed the
necessary mathematical concepts.
While not all data is numerical, it is often useful to consider data in a num-
ber format. In this book, we assume that data has already been appropriately
converted into a numerical representation suitable for reading into a computer
data as vectors program. Therefore, we think of data as vectors. As another illustration of how
subtle words are, there are (at least) three different ways to think about vectors:
a vector as an array of numbers (a computer science view), a vector as an arrow
with a direction and magnitude (a physics view), and a vector as an object that
obeys addition and scaling (a mathematical view).
model A model is typically used to describe a process for generating data, similar to
the dataset at hand. Therefore, good models can also be thought of as simplified
versions of the real (unknown) data-generating process, capturing aspects that
are relevant for modeling the data and extracting hidden patterns from them. A
good model can then be used to predict what would happen in the real world
without performing real-world experiments.
learning We now come to the crux of the matter, the learning component of machine
learning. Assume we are given a dataset and a suitable model. Training the model
means to use the data available to optimize some parameters of the model with
respect to a utility function that evaluates how well the model predicts the train-
ing data. Most training methods can be thought of as an approach analogous to
climbing a hill to reach its peak. In this analogy, the peak of the hill corresponds
to a maximum of some desired performance measure. However, in practice, we
are interested in the model to perform well on unseen data. Performing well on
data that we have already seen (training data) may only mean that we found a
good way to memorize the data. However, this may not generalize well to unseen
data, and, in practical applications, we often need to expose our machine learning
system to situations that it has not encountered before.
Let us summarize the main concepts of machine learning that we cover in this
book:
▪ We represent data as vectors.
▪ We choose an appropriate model, either using the probabilistic or optimization
view.
▪ We learn from available data by using numerical optimization methods with
the aim that the model performs well on data not used for training.
1.2 Two Ways to Read This Book 5

1.2 Two Ways to Read This Book


We can consider two strategies for understanding the mathematics for machine
learning:
▪ Bottom-up: Building up the concepts from foundational to more advanced.
This is often the preferred approach in more technical fields, such as mathe-
matics. This strategy has the advantage that the reader at all times is able to rely
on their previously learned concepts. Unfortunately, for a practitioner many of
the foundational concepts are not particularly interesting by themselves, and
the lack of motivation means that most foundational definitions are quickly
forgotten.
▪ Top-down: Drilling down from practical needs to more basic requirements.
This goal-driven approach has the advantage that the readers know at all times
why they need to work on a particular concept, and there is a clear path of
required knowledge. The downside of this strategy is that the knowledge is
built on potentially shaky foundations, and the readers have to remember a set
of words that they do not have any way of understanding.
We decided to write this book in a modular way to separate foundational
(mathematical) concepts from applications so that this book can be read in both
ways. The book is split into two parts, where Part I lays the mathematical founda-
tions and Part II applies the concepts from Part I to a set of fundamental machine
learning problems, which form four pillars of machine learning as illustrated in
Figure 1.1: regression, dimensionality reduction, density estimation, and classi-
fication. Chapters in Part I mostly build upon the previous ones, but it is possible
to skip a chapter and work backward if necessary. Chapters in Part II are only
loosely coupled and can be read in any order. There are many pointers forward
and backward between the two parts of the book to link mathematical concepts
with machine learning algorithms.
Of course there are more than two ways to read this book. Most readers learn
using a combination of top-down and bottom-up approaches, sometimes building
up basic mathematical skills before attempting more complex concepts, but also
choosing topics based on applications of machine learning.

Part I Is about Mathematics


The four pillars of machine learning we cover in this book (see Figure 1.1)
require a solid mathematical foundation, which is laid out in Part I.
We represent numerical data as vectors and represent a table of such data as
a matrix. The study of vectors and matrices is called linear algebra, which we linear algebra
introduce in Chapter 2. The collection of vectors as a matrix is also described
there.
Given two vectors representing two objects in the real world, we want to
make statements about their similarity. The idea is that vectors that are similar
should be predicted to have similar outputs by our machine learning algorithm
(our predictor). To formalize the idea of similarity between vectors, we need
to introduce operations that take two vectors as input and return a numerical
6 Introduction and Motivation
Figure 1.1 The
foundations and four
pillars of machine Machine Learning
learning.

Dimensionality

Classification
Reduction
Regression

Estimation
Density
Vector Calculus Probability & Distributions Optimization
Linear Algebra Analytic Geometry Matrix Decomposition

value representing their similarity. The construction of similarity and distances


analytic geometry is central to analytic geometry and is discussed in Chapter 3.
In Chapter 4, we introduce some fundamental concepts about matrices and
matrix decomposition matrix decomposition. Some operations on matrices are extremely useful in ma-
chine learning, and they allow for an intuitive interpretation of the data and more
efficient learning.
We often consider data to be noisy observations of some true underlying sig-
nal. We hope that by applying machine learning we can identify the signal from
the noise. This requires us to have a language for quantifying what “noise”
means. We often would also like to have predictors that allow us to express some
sort of uncertainty, e.g., to quantify the confidence we have about the value of
the prediction at a particular test data point. Quantification of uncertainty is the
probability theory realm of probability theory and is covered in Chapter 6.
To train machine learning models, we typically find parameters that maximize
some performance measure. Many optimization techniques require the concept
of a gradient, which tells us the direction in which to search for a solution.
vector calculus Chapter 5 is about vector calculus and details the concept of gradients, which we
optimization subsequently use in Chapter 7, where we talk about optimization to find maxima/
minima of functions.

Part II Is about Machine Learning


The second part of the book introduces four pillars of machine learning as shown
in Figure 1.1. We illustrate how the mathematical concepts introduced in the first
part of the book are the foundation for each pillar. Broadly speaking, chapters
are ordered by difficulty (in ascending order).
In Chapter 8, we restate the three components of machine learning (data,
models, and parameter estimation) in a mathematical fashion. In addition, we
provide some guidelines for building experimental setups that guard against
overly optimistic evaluations of machine learning systems. Recall that the goal
is to build a predictor that performs well on unseen data.
linear regression In Chapter 9, we will have a close look at linear regression, where our ob-
jective is to find functions that map inputs x ∈ RD to corresponding observed
1.3 Exercises and Feedback 7

function values y ∈ R, which we can interpret as the labels of their respective


inputs. We will discuss classical model fitting (parameter estimation) via maxi-
mum likelihood and maximum a posteriori estimation, as well as Bayesian linear
regression, where we integrate the parameters out instead of optimizing them.
Chapter 10 focuses on dimensionality reduction, the second pillar in Fig- dimensionality
ure 1.1, using principal component analysis. The key objective of dimension- reduction
ality reduction is to find a compact, lower-dimensional representation of high-
dimensional data x ∈ RD , which is often easier to analyze than the original data.
Unlike regression, dimensionality reduction is only concerned about modeling
the data – there are no labels associated with a data point x.
In Chapter 11, we will move to our third pillar: density estimation. The ob- density estimation
jective of density estimation is to find a probability distribution that describes
a given dataset. We will focus on Gaussian mixture models for this purpose,
and we will discuss an iterative scheme to find the parameters of this model. As
in dimensionality reduction, there are no labels associated with the data points
x ∈ RD . However, we do not seek a low-dimensional representation of the data.
Instead, we are interested in a density model that describes the data.
Chapter 12 concludes the book with an in-depth discussion of the fourth pillar:
classification. We will discuss classification in the context of support vector classification
machines. Similar to regression (Chapter 9), we have inputs x and corresponding
labels y. However, unlike regression, where the labels were real-valued, the
labels in classification are integers, which requires special care.

1.3 Exercises and Feedback


We provide some exercises in Part I, which can be done mostly by pen and paper.
For Part II, we provide programming tutorials (jupyter notebooks) to explore
some properties of the machine learning algorithms we discuss in this book.
We appreciate that Cambridge University Press strongly supports our aim to
democratize education and learning by making this book freely available for
download at
https://mml-book.com
where tutorials, errata, and additional materials can be found. Mistakes can be
reported and feedback provided using the preceding URL.
2

Linear Algebra

When formalizing intuitive concepts, a common approach is to construct a set of


objects (symbols) and a set of rules to manipulate these objects. This is known
algebra as an algebra. Linear algebra is the study of vectors and certain rules to manip-
ulate vectors. The vectors many of us know from school are called “geometric
vectors,” which are usually denoted by a small arrow above the letter, e.g., − →
x
and −→y . In this book, we discuss more general concepts of vectors and use a bold
letter to represent them, e.g., x and y.
In general, vectors are special objects that can be added together and multi-
plied by scalars to produce another object of the same kind. From an abstract
mathematical viewpoint, any object that satisfies these two properties can be
considered a vector. Here are some examples of such vector objects:
1. Geometric vectors. This example of a vector may be familiar from high school
mathematics and physics. Geometric vectors – see Figure 2.1(a) – are directed
segments, which can be drawn (at least in two dimensions). Two geometric
→ → → → →
vectors x, y can be added, such that x + y = z is another geometric vector.

Furthermore, multiplication by a scalar λ x, λ ∈ R, is also a geometric vector.
In fact, it is the original vector scaled by λ. Therefore, geometric vectors are
instances of the vector concepts introduced previously. Interpreting vectors
as geometric vectors enables us to use our intuitions about direction and
magnitude to reason about mathematical operations.
2. Polynomials are also vectors; see Figure 2.1(b): Two polynomials can be
added together, which results in another polynomial; and they can be mul-
tiplied by a scalar λ ∈ R, and the result is a polynomial as well. Therefore,
polynomials are (rather unusual) instances of vectors. Note that polynomials

Figure 2.1 Different → →


4
types of vectors. x+y
2
Vectors can be
surprising objects, 0
including
y

(a) geometric vectors → −2


x →
and (b) polynomials.
y −4

−6
−2 0 2
x

(a) Geometric vectors (b) Polynomials

8
Linear Algebra 9

are very different from geometric vectors. While geometric vectors are con-
crete “drawings,” polynomials are abstract concepts. However, they are both
vectors in the sense previously described.
3. Audio signals are vectors. Audio signals are represented as a series of num-
bers. We can add audio signals together, and their sum is a new audio signal.
If we scale an audio signal, we also obtain an audio signal. Therefore, audio
signals are a type of vector, too.
4. Elements of Rn (tuples of n real numbers) are vectors. Rn is more abstract
than polynomials, and it is the concept we focus on in this book. For instance,
⎡ ⎤
1
a = ⎣2⎦ ∈ R3 (2.1)
3
is an example of a triplet of numbers. Adding two vectors a, b ∈ Rn compo-
nentwise results in another vector: a + b = c ∈ Rn . Moreover, multiplying
a ∈ Rn by λ ∈ R results in a scaled vector λa ∈ Rn . Considering vectors Be careful to check
as elements of Rn has an additional benefit that it loosely corresponds to whether array
operations actually
arrays of real numbers on a computer. Many programming languages support
perform vector
array operations, which allow for convenient implementation of algorithms operations when
that involve vector operations. implementing on a
computer.
Linear algebra focuses on the similarities between these vector concepts. We
can add them together and multiply them by scalars. We will largely focus on
vectors in Rn since most algorithms in linear algebra are formulated in Rn . We
will see in Chapter 8 that we often consider data to be represented as vectors in
Rn . In this book, we will focus on finite-dimensional vector spaces, in which
case there is a 1:1 correspondence between any kind of vector and Rn . When it
is convenient, we will use intuitions about geometric vectors and consider array-
based algorithms. Pavel Grinfeld’s series
One major idea in mathematics is the idea of “closure.” This is the question: on linear algebra:
http://tinyurl.com/
What is the set of all things that can result from my proposed operations? In the
nahclwm
case of vectors: What is the set of vectors that can result by starting with a small Gilbert Strang’s
set of vectors, and adding them to each other and scaling them? This results in course on linear
a vector space (Section 2.4). The concept of a vector space and its properties algebra: http://
tinyurl.com/29p5q8j
underlie much of machine learning. The concepts introduced in this chapter are
3Blue1Brown series
summarized in Figure 2.2. on linear algebra:
This chapter is mostly based on the lecture notes and books by Drumm and https://tinyurl
Weil (2001), Strang (2003), Hogben (2013), Liesen and Mehrmann (2015), as .com/h5g4kps
well as Pavel Grinfeld’s Linear Algebra series. Other excellent resources are
Gilbert Strang’s Linear Algebra course at MIT and the Linear Algebra Series by
3Blue1Brown.
Linear algebra plays an important role in machine learning and general math-
ematics. The concepts introduced in this chapter are further expanded to include
the idea of geometry in Chapter 3. In Chapter 5, we will discuss vector calculus,
where a principled knowledge of matrix operations is essential. In Chapter 10,
10 Linear Algebra
Figure 2.2 A mind Vector
map of the concepts s
se prop
introduced in this po erty

closure
m
chapter, along with co of
where they are used in
Chapter 5 Matrix Abelian
other parts of the Vector calculus with +
ts Vector space Group Linear
book.
sen independence

rep
re
rep

rese

maximal set
nts
System of
linear equations
Linear/affine
so mapping
lve
solved by

s Basis

Matrix
inverse
Gaussian
elimination

Chapter 3 Chapter 12 Chapter 10


Analytic geometry Classification Dimensionality
reduction

we will use projections (to be introduced in Section 3.8) for dimensionality re-
duction with principal component analysis (PCA). In Chapter 9, we will discuss
linear regression, where linear algebra plays a central role for solving least-
squares problems.

2.1 Systems of Linear Equations


Systems of linear equations play a central part of linear algebra. Many problems
can be formulated as systems of linear equations, and linear algebra gives us the
tools for solving them.

Example 2.1
A company produces products N1 , . . . , Nn for which resources R1 , . . . , Rm
are required. To produce a unit of product Nj , aij units of resource Ri are
needed, where i = 1, . . . , m and j = 1, . . . , n.
The objective is to find an optimal production plan, i.e., a plan of how
many units xj of product Nj should be produced if a total of bi units of
resource Ri are available and (ideally) no resources are left over.
If we produce x1 , . . . , xn units of the corresponding products, we need a
total of
ai1 x1 + · · · + ain xn (2.2)
many units of resource Ri . An optimal production plan (x1 , . . . , xn ) ∈ Rn ,
therefore, has to satisfy the following system of equations:
a11 x1 + · · · + a1n xn = b1
.. , (2.3)
.
am1 x1 + · · · + amn xn = bm
where aij ∈ R and bi ∈ R.
2.1 Systems of Linear Equations 11

Equation (2.3) is the general form of a system of linear equations, and system of linear
x1 , . . . , xn are the unknowns of this system. Every n-tuple (x1 , . . . , xn ) ∈ Rn equations
that satisfies (2.3) is a solution of the linear equation system. solution

Example 2.2
The system of linear equations
x1 + x 2 + x 3 = 3 (1)
x1 − x2 + 2x3 = 2 (2) (2.4)
2x1 + 3x3 = 1 (3)
has no solution: Adding the first two equations yields 2x1 + 3x3 = 5, which
contradicts the third equation (3).
Let us have a look at the system of linear equations
x1 + x 2 + x 3 = 3 (1)
x1 − x2 + 2x3 = 2 (2) . (2.5)
x2 + x 3 = 2 (3)
From the first and third equation, it follows that x1 = 1. From (1) + (2),
we get 2x1 + 3x3 = 5, i.e., x3 = 1. From (3), we then get that x2 = 1.
Therefore, (1, 1, 1) is the only possible and unique solution (verify that
(1, 1, 1) is a solution by plugging in).
As a third example, we consider
x1 + x 2 + x 3 = 3 (1)
x1 − x2 + 2x3 = 2 (2) . (2.6)
2x1 + 3x3 = 5 (3)
Since (1) + (2) = (3), we can omit the third equation (redundancy). From
(1) and (2), we get 2x1 = 5 − 3x3 and 2x2 = 1 + x3 . We define x3 = a ∈ R
as a free variable, such that any triplet

5 3 1 1
− a, + a, a , a ∈ R (2.7)
2 2 2 2
is a solution of the system of linear equations, i.e., we obtain a solution set
that contains infinitely many solutions.

In general, for a real-valued system of linear equations we obtain either no,


exactly one, or infinitely many solutions. Linear regression (Chapter 9) solves a
version of Example 2.1 when we cannot solve the system of linear equations.
Remark (Geometric Interpretation of Systems of Linear Equations). In a system
of linear equations with two variables x1 , x2 , each linear equation defines a line
on the x1 x2 -plane. Since a solution to a system of linear equations must satisfy
all equations simultaneously, the solution set is the intersection of these lines.
This intersection set can be a line (if the linear equations describe the same
line), a point, or empty (when the lines are parallel). An illustration is given
in Figure 2.3 for the system
4x1 + 4x2 = 5
(2.8)
2x1 − 4x2 = 1
12 Linear Algebra
Figure 2.3 The
solution space of a x2
system of two linear
equations with two
4x1 + 4x2 = 5
variables can be
geometrically
interpreted as the 2x1 − 4x2 = 1
intersection of two
lines. Every linear
equation represents
a line.
x1

 
where the solution space is the point x1 , x2 ) = (1, 14 . Similarly, for three vari-
ables, each linear equation determines a plane in three-dimensional space. When
we intersect these planes, i.e., satisfy all linear equations at the same time, we
can obtain a solution set that is a plane, a line, a point, or empty (when the planes
have no common intersection). ♦
For a systematic approach to solving systems of linear equations, we will in-
troduce a useful compact notation. We collect the coefficients aij into vectors and
collect the vectors into matrices. In other words, we write the system from (2.3)
in the following form:
⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤
a11 a12 a1n b1
⎢ .. ⎥ ⎢ .. ⎥ ⎢ .. ⎥ ⎢ .. ⎥
x1 ⎣ . ⎦ + x 2 ⎣ . ⎦ + · · · + xn ⎣ . ⎦ = ⎣ . ⎦ (2.9)
am1 am2 amn bm
⎡ ⎤⎡ ⎤ ⎡ ⎤
a11 · · · a1n x1 b1
⎢ .. .. ⎥ ⎢ .. ⎥ = ⎢ .. ⎥ .
⇐⇒ ⎣ . . ⎦⎣ . ⎦ ⎣ . ⎦ (2.10)
am1 · · · amn xn bm
In the following, we will have a close look at these matrices and define compu-
tation rules. We will return to solving linear equations in Section 2.3.

2.2 Matrices
Matrices play a central role in linear algebra. They can be used to compactly rep-
resent systems of linear equations, but they also represent linear functions (linear
mappings), as we will see later in Section 2.7. Before we discuss some of these
interesting topics, let us first define what a matrix is and what kind of operations
we can do with matrices. We will see more properties of matrices in Chapter 4.
matrix Definition 2.1 (Matrix). With m, n ∈ N a real-valued (m, n) matrix A is an
m · n-tuple of elements aij , i = 1, . . . , m, j = 1, . . . , n, which is ordered
according to a rectangular scheme consisting of m rows and n columns:
⎡ ⎤
a11 a12 · · · a1n
⎢ a21 a22 · · · a2n ⎥
⎢ ⎥
A=⎢ . .. .. ⎥ , aij ∈ R . (2.11)
⎣ .. . . ⎦
am1 am2 · · · amn
2.2 Matrices 13

By convention (1, n)-matrices are called rows, and (m, 1)-matrices are called row
columns. These special matrices are also called row/column vectors. column
row vector
Rm×n
is the set of all real-valued (m, n)-matrices. A ∈ R m×n
can be equiv- column vector
alently represented as a ∈ Rmn by stacking all n columns of the matrix into a
Figure 2.4 By
long vector; see Figure 2.4. stacking its columns,
a matrix A can be
represented as a long
2.2.1 Matrix Addition and Multiplication vector a.

The sum of two matrices A ∈ Rm×n , B ∈ Rm×n is defined as the element wise A ∈ R4×2 a ∈ R8

sum, i.e.,
⎡ ⎤ re-shape

a11 + b11 · · · a1n + b1n


⎢ .. .. ⎥
⎦∈R
m×n
A + B := ⎣ . . . (2.12)
am1 + bm1 · · · amn + bmn
For matrices A ∈ Rm×n , B ∈ Rn×k the elements cij of the product C =
AB ∈ Rm×k are computed as Note the size of the
n
matrices.
cij = ail blj , i = 1, . . . , m, j = 1, . . . , k. (2.13) C =
l=1 np.einsum(’il,
This means, to compute element cij we multiply the elements of the ith row of lj’, A, B)
A with the jth column of B and sum them up. Later in Section 3.2, we will There are n columns
call this the dot product of the corresponding row and column. In cases where in A and n rows in B
we need to be explicit that we are performing multiplication, we use the notation so that we can
A · B to denote multiplication (explicitly showing “·”). compute ail blj for
l = 1, . . . , n.
Remark. Matrices can only be multiplied if their “neighboring” dimensions Commonly, the dot
match. For instance, an n × k-matrix A can be multiplied with a k × m-matrix product between two
B, but only from the left side: vectors a, b is
denoted by a b or
A B
  = 
C (2.14) a, b.
n×k k×m n×m
The product BA is not defined if m = n since the neighboring dimensions do
not match. ♦
Remark. Matrix multiplication is not defined as an elementwise operation on
matrix elements, i.e., cij = aij bij (even if the size of A, B was chosen appro-
priately). This kind of elementwise multiplication often appears in programming
languages when we multiply (multidimensional) arrays with each other, and is
called a Hadamard product. ♦ Hadamard product

Example 2.3 ⎡ ⎤
  0 2
1 2 3
For A = ∈ R2×3 , B = ⎣1 −1⎦ ∈ R3×2 , we obtain
3 2 1
0 1
⎡ ⎤
  0 2  
1 2 3 ⎣ 2 3
AB = 1 −1⎦ = ∈ R2×2 , (2.15)
3 2 1 2 5
0 1
14 Linear Algebra

⎡ ⎤ ⎡ ⎤
0 2   6 4 2
1 2 3
BA = ⎣1 −1⎦ = ⎣−2 0 2⎦ ∈ R3×3 . (2.16)
3 2 1
0 1 3 2 1

Figure 2.5 Even if


both matrix From this example, we can already see that matrix multiplication is not com-
multiplications AB
mutative, i.e., AB = BA; see also Figure 2.5 for an illustration.
and BA are defined,
the dimensions of the Definition 2.2 (Identity Matrix). In Rn×n , we define the identity matrix
results can be ⎡ ⎤
different. 1 0 ··· 0 ··· 0
⎢0 1 · · · 0 · · · 0⎥
⎢ ⎥
⎢ .. .. .. . .. .⎥
⎢. . . .. . .. ⎥
I n := ⎢
⎢0 0
⎥ ∈ Rn×n (2.17)
⎢ · · · 1 · · · 0⎥ ⎥
⎢ .. .. .. . .. .⎥
identity matrix ⎣. . . .. . .. ⎦
0 0 ··· 0 ··· 1
as the n × n-matrix containing 1 on the diagonal and 0 everywhere else.
Now that we defined matrix multiplication, matrix addition, and the identity
matrix, let us have a look at some properties of matrices:
associativity ▪ Associativity:
∀A ∈ Rm×n , B ∈ Rn×p , C ∈ Rp×q : (AB)C = A(BC) (2.18)
distributivity ▪ Distributivity:
∀A, B ∈ Rm×n , C, D ∈ Rn×p : (A + B)C = AC + BC (2.19a)
A(C + D) = AC + AD (2.19b)
▪ Multiplication with the identity matrix:
∀A ∈ Rm×n : I m A = AI n = A (2.20)
Note that I m = I n for m = n.

2.2.2 Inverse and Transpose


A square matrix Definition 2.3 (Inverse). Consider a square matrix A ∈ Rn×n . Let matrix
possesses the same B ∈ Rn×n have the property that AB = I n = BA. B is called the inverse of
number of columns
A and denoted by A−1 .
and rows.
inverse Unfortunately, not every matrix A possesses an inverse A−1 . If this inverse
regular does exist, A is called regular/invertible/nonsingular, otherwise singular/
invertible noninvertible. When the matrix inverse exists, it is unique. In Section 2.3,
nonsingular we will discuss a general way to compute the inverse of a matrix by solving a
singular
system of linear equations.
noninvertible
Remark (Existence of the Inverse of a 2 × 2-matrix). Consider a matrix
 
a a12
A := 11 ∈ R2×2 . (2.21)
a21 a22
2.2 Matrices 15

If we multiply A with
 
a22 −a12
B := (2.22)
−a21 a11
we obtain 
a11 a22 − a12 a21 0
AB = = (a11 a22 − a12 a21 )I. (2.23)
0 a11 a22 − a12 a21
Therefore,  
1 a22 −a12
A−1 = (2.24)
a11 a22 − a12 a21 −a21 a11
if and only if a11 a22 − a12 a21 = 0. In Section 4.1, we will see that a11 a22 −
a12 a21 is the determinant of a 2 × 2-matrix. Furthermore, we can generally use
the determinant to check whether a matrix is invertible. ♦

Example 2.4 (Inverse Matrix)


The matrices
⎡ ⎤ ⎡ ⎤
1 2 1 −7 −7 6
A = ⎣4 4 5⎦ , B=⎣ 2 1 −1⎦ (2.25)
6 7 7 4 5 −4
are inverse to each other since AB = I = BA.

Definition 2.4 (Transpose). For A ∈ Rm×n the matrix B ∈ Rn×m with bij =
aji is called the transpose of A. We write B = A . transpose
The main diagonal
In general, A can be obtained by writing the columns of A as the rows of (sometimes called

A . The following are some important properties of inverses and transposes: “principal diagonal,”
AA−1 = I = A−1 A (2.26) “primary diagonal,”
“leading diagonal,” or
(AB)−1 = B −1 A−1 (2.27) “major diagonal”) of a
−1 −1 −1 matrix A is the
(A + B) = A +B (2.28) collection of entries
  Aij where i = j.
(A ) = A (2.29)
   The scalar case of
(A + B) = A + B (2.30) (2.28) is
= 16 = 12 +
(AB) = B  A
1 1
.
(2.31) 2+4 4

Definition 2.5 (Symmetric Matrix). A matrix A ∈ R n×n


is symmetric if symmetric matrix
A = A .
Note that only (n, n)-matrices can be symmetric. Generally, we call (n, n)-
matrices also square matrices because they possess the same number of square matrix
rows and columns. Moreover, if A is invertible, then so is A , and
(A−1 ) = (A )−1 =: A− .
Remark (Sum and Product of Symmetric Matrices). The sum of symmetric
matrices A, B ∈ Rn×n is always symmetric. However, although their product
is always defined, it is generally not symmetric:
    
1 0 1 1 1 1
= . (2.32)
0 0 1 1 0 0

16 Linear Algebra

2.2.3 Multiplication by a Scalar


Let us look at what happens to matrices when they are multiplied by a scalar
λ ∈ R. Let A ∈ Rm×n and λ ∈ R. Then λA = K, Kij = λ aij . Practically, λ
scales each element of A. For λ, ψ ∈ R, the following holds:
associativity
▪ Associativity:
(λψ)C = λ(ψC), C ∈ Rm×n
▪ λ(BC) = (λB)C = B(λC) = (BC)λ, B ∈ Rm×n , C ∈ Rn×k .
Note that this allows us to move scalar values around.
distributivity ▪ (λC) = C  λ = C  λ = λC  since λ = λ for all λ ∈ R.
▪ Distributivity:
(λ + ψ)C = λC + ψC, C ∈ Rm×n
λ(B + C) = λB + λC, B, C ∈ Rm×n

Example 2.5 (Distributivity)


If we define
 
1 2
C := , (2.33)
3 4
then for any λ, ψ ∈ R we obtain
   
(λ + ψ)1 (λ + ψ)2 λ + ψ 2λ + 2ψ
(λ + ψ)C = = (2.34a)
(λ + ψ)3 (λ + ψ)4 3λ + 3ψ 4λ + 4ψ
   
λ 2λ ψ 2ψ
= + = λC + ψC . (2.34b)
3λ 4λ 3ψ 4ψ

2.2.4 Compact Representations of Systems of Linear Equations


If we consider the system of linear equations

2x1 + 3x2 + 5x3 = 1


4x1 − 2x2 − 7x3 = 8 (2.35)
9x1 + 5x2 − 3x3 = 2

and use the rules for matrix multiplication, we can write this equation system in
a more compact form as
⎡ ⎤⎡ ⎤ ⎡ ⎤
2 3 5 x1 1
⎣4 −2 −7⎦ ⎣x2 ⎦ = ⎣8⎦ . (2.36)
9 5 −3 x3 2

Note that x1 scales the first column, x2 the second one, and x3 the third one.
Generally, a system of linear equations can be compactly represented in their
matrix form as Ax = b; see (2.3), and the product Ax is a (linear) combination
of the columns of A. We will discuss linear combinations in more detail in
Section 2.5.
2.3 Solving Systems of Linear Equations 17

2.3 Solving Systems of Linear Equations


In (2.3), we introduced the general form of an equation system, i.e.,
a11 x1 + · · · + a1n xn = b1
.. (2.37)
.
am1 x1 + · · · + amn xn = bm ,
where aij ∈ R and bi ∈ R are known constants and xj are unknowns, i =
1, . . . , m, j = 1, . . . , n. Thus far, we saw that matrices can be used as a compact
way of formulating systems of linear equations so that we can write Ax = b;
see (2.10). Moreover, we defined basic matrix operations, such as addition and
multiplication of matrices. In the following, we will focus on solving systems of
linear equations and provide an algorithm for finding the inverse of a matrix.

2.3.1 Particular and General Solution


Before discussing how to generally solve systems of linear equations, let us have
a look at an example. Consider the system of equations
⎡ ⎤
  x1  
1 0 8 −4 ⎢ ⎥
⎢x2 ⎥ = 42 . (2.38)
0 1 2 12 ⎣x3 ⎦ 8
x4
The system has two equations and four unknowns. Therefore, in general we
would expect infinitely many solutions. This system of equations is in a partic-
ularly easy form, where the first two columns consist of a 1 and a 0. Remember
4
that we want to find scalars x1 , . . . , x4 , such that i=1 xi ci = b, where we
define ci to be the ith column of the matrix and b the right-hand side of (2.38).
A solution to the problem in (2.38) can be found immediately by taking 42 times
the first column and 8 times the second column so that
     
42 1 0
b= = 42 +8 . (2.39)
8 0 1
Therefore, a solution is [42, 8, 0, 0] . This solution is called a particular solution particular solution
or special solution. However, this is not the only solution of this system of linear special solution
equations. To capture all the other solutions, we need to be creative in generating
0 in a nontrivial way using the columns of the matrix: Adding 0 to our special
solution does not change the special solution. To do so, we express the third
column using the first two columns (which are of this very simple form)
     
8 1 0
=8 +2 (2.40)
2 0 1
so that 0 = 8c1 + 2c2 − 1c3 + 0c4 and (x1 , x2 , x3 , x4 ) = (8, 2, −1, 0). In fact,
any scaling of this solution by λ1 ∈ R produces the 0 vector, i.e.,
⎛ ⎡ ⎤⎞
  8
1 0 8 −4 ⎜ ⎢ 2 ⎥⎟
⎜λ ⎢ ⎥⎟ = λ1 (8c1 + 2c2 − c3 ) = 0 . (2.41)
0 1 2 12 ⎝ 1 ⎣−1⎦⎠
0
18 Linear Algebra

Following the same line of reasoning, we express the fourth column of the ma-
trix in (2.38) using the first two columns and generate another set of nontrivial
versions of 0 as ⎛ ⎡ ⎤⎞
  −4
1 0 8 −4 ⎜ ⎢ 12 ⎥⎟
⎜λ ⎢ ⎥⎟ = λ2 (−4c1 + 12c2 − c4 ) = 0 (2.42)
0 1 2 12 ⎝ 2 ⎣ 0 ⎦⎠
−1
for any λ2 ∈ R. Putting everything together, we obtain all solutions of the
general solution equation
⎧ system in (2.38),
⎡ ⎤which is ⎡ called
⎤ the general
⎡ ⎤ solution, as ⎫ the set

⎪ 42 8 −4 ⎪

⎨ ⎢8⎥ ⎢2⎥ ⎢ 12 ⎥ ⎬
x∈R :x=⎢
4
⎣0⎦
⎥ + λ 1 ⎢ ⎥ + λ2 ⎢ ⎥ , λ 1 , λ2 ∈ R .
⎣−1⎦ ⎣0⎦ (2.43)

⎪ ⎪

⎩ ⎭
0 0 −1
Remark. The general approach we followed consisted of the following three
steps:
1. Find a particular solution to Ax = b.
2. Find all solutions to Ax = 0.
3. Combine the solutions from steps 1 and 2 to the general solution.
Neither the general nor the particular solution is unique. ♦
The system of linear equations in the preceding example was easy to solve
because the matrix in (2.38) has this particularly convenient form, which al-
lowed us to find the particular and the general solution by inspection. However,
general equation systems are not of this simple form. Fortunately, there exists a
constructive algorithmic way of transforming any system of linear equations into
this particularly simple form: Gaussian elimination. Key to Gaussian elimination
are elementary transformations of systems of linear equations, which transform
the equation system into a simple form. Then we can apply the three steps to the
simple form that we just discussed in the context of the example in (2.38).

2.3.2 Elementary Transformations


elementary Key to solving a system of linear equations are elementary transformations that
transformations keep the solution set the same, but that transform the equation system into a
simpler form:
▪ Exchange of two equations (rows in the matrix representing the system of
equations)
▪ Multiplication of an equation (row) with a constant λ ∈ R\{0}
▪ Addition of two equations (rows)

Example 2.6
For a ∈ R, we seek all solutions of the following system of equations:
−2x1 + 4x2 − 2x3 − x4 + 4x5 = −3
4x1 − 8x2 + 3x3 − 3x4 + x5 = 2
. (2.44)
x1 − 2x2 + x3 − x4 + x5 = 0
x1 − 2x2 − 3x4 + 4x5 = a
2.3 Solving Systems of Linear Equations 19

We start by converting this system of equations into the compact matrix


notation Ax = b. We no longer mention! " variables x explicitly and build
the
the augmented matrix (in the form A | b ) augmented matrix
⎡ ⎤
−2 4 −2 −1 4 −3 Swap with R3
⎢ 4 −8 3 −3 1 2 ⎥
⎢ ⎥
⎣ 1 −2 1 −1 1 0 ⎦ Swap with R1
1 −2 0 −3 4 a
where we used the vertical line to separate the left-hand side from the right-
hand side in (2.44). We use  to indicate a transformation of the augmented
matrix using elementary transformations. The
 augmented
 matrix
Swapping Rows 1 and 3 leads to A | b compactly
⎡ ⎤ represents the system
1 −2 1 −1 1 0 of linear equations
⎢ −8 −3 2 ⎥
⎢ 4 3 1 ⎥ −4R1 Ax = b.
⎣ −2 4 −2 −1 4 −3 ⎦ +2R1
1 −2 0 −3 4 a −R1
When we now apply the indicated transformations (e.g., subtract Row 1 four
times from Row 2), we obtain
⎡ ⎤
1 −2 1 −1 1 0
⎢ 0 0 −1 1 −3 2 ⎥
⎢ ⎥
⎣ 0 0 0 −3 6 −3 ⎦
0 0 −1 −2 3 a −R2 − R3
⎡ ⎤
1 −2 1 −1 1 0
⎢ −1 −3 2 ⎥
 ⎢
0 0 1 ⎥ ·(−1)
⎣ 0 0 0 −3 6 −3 ⎦ ·(− 13 )
0 0 0 0 0 a+1
⎡ ⎤
1 −2 1 −1 1 0
⎢ 0 0 1 −1 3 −2 ⎥
 ⎢ ⎣

0 0 0 1 −2 1 ⎦
0 0 0 0 0 a+1
This (augmented) matrix is in a convenient form, the row-echelon form row-echelon form
(REF). Reverting this compact notation back into the explicit notation with
the variables we seek, we obtain
x1 − 2x2 + x3 − x4 + x5 = 0
x3 − x4 + 3x5 = −2
. (2.45)
x4 − 2x5 = 1
0 = a+1
Only for a = −1 this system can be solved. A particular solution is particular solution
⎡ ⎤ ⎡ ⎤
x1 2
⎢x2 ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢x3 ⎥ = ⎢−1⎥ . (2.46)
⎢ ⎥ ⎢ ⎥
⎣x4 ⎦ ⎣ 1 ⎦
x5 0
20 Linear Algebra

general solution The general solution, which captures the set of all possible solutions, is
⎧ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎫

⎪ 2 2 2 ⎪


⎪ ⎢0⎥ ⎢ 1⎥ ⎢0⎥ ⎪

⎨ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎬
x∈R :x=⎢
5
−1
⎢ ⎥
⎥ + λ1 ⎢0⎥ + λ2 ⎢−1⎥ , λ1 , λ2 ∈ R . (2.47)
⎢ ⎥ ⎢ ⎥

⎪ ⎣1⎦ ⎣ 0⎦ ⎣2⎦ ⎪


⎪ ⎪

⎩ ⎭
0 0 1

In the following, we will detail a constructive way to obtain a particular and


general solution of a system of linear equations.
Remark (Pivots and Staircase Structure). The leading coefficient of a row (first
pivot nonzero number from the left) is called the pivot and is always strictly to the right
of the pivot of the row above it. Therefore, any equation system in row-echelon
form always has a “staircase” structure. ♦

row-echelon form Definition 2.6 (Row-Echelon Form). A matrix is in row-echelon form if


▪ All rows that contain only zeros are at the bottom of the matrix; correspond-
ingly, all rows that contain at least one nonzero element are on top of rows that
contain only zeros.
▪ Looking at nonzero rows only, the first nonzero number from the left (also
pivot called the pivot or the leading coefficient) is always strictly to the right of the
leading coefficient pivot of the row above it.
In other texts, it is
sometimes required Remark (Basic and Free Variables). The variables corresponding to the pivots in
that the pivot is 1. the row-echelon form are called basic variable, and the other variables are free
basic variable variable. For example, in (2.45), x1 , x3 , x4 are basic variables, whereas x2 , x5
free variable are free variables. ♦
Remark (Obtaining a Particular Solution). The row-echelon form makes our
lives easier when we need to determine a particular solution. To do this, we
express the
right-hand side of the equation system using the pivot columns, such
P
that b = i=1 λi pi , where pi , i = 1, . . . , P , are the pivot columns. The λi are
determined easiest if we start with the rightmost pivot column and work our way
to the left.
In the previous example, we would try to find λ1 , λ2 , λ3 so that
⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤
1 1 −1 0
⎢0⎥ ⎢1⎥ ⎢−1⎥ ⎢−2⎥
λ1 ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣0⎦ + λ2 ⎣0⎦ + λ3 ⎣ 1 ⎦ = ⎣ 1 ⎦ . (2.48)
0 0 0 0

From here, we find relatively directly that λ3 = 1, λ2 = −1, λ1 = 2. When


we put everything together, we must not forget the nonpivot columns for which
we set the coefficients implicitly to 0. Therefore, we get the particular solution
x = [2, 0, −1, 1, 0] . ♦
2.3 Solving Systems of Linear Equations 21

Remark (Reduced Row-Echelon Form). An equation system is in reduced row- reduced row-echelon
echelon form (also: row-reduced-echelon form or row canonical form) if form

▪ It is in row-echelon form.
▪ Every pivot is 1.
▪ The pivot is the only nonzero entry in its column.

The reduced row-echelon form will play an important role later in Sec-
tion 2.3.3 because it allows us to determine the general solution of a system of
linear equations in a straightforward way.
Gaussian elimination
Remark (Gaussian Elimination). Gaussian elimination is an algorithm that per-
forms elementary transformations to bring a system of linear equations into
reduced row-echelon form. ♦

Example 2.7 (Reduced Row-Echelon Form)


Verify that the following matrix is in reduced row-echelon form (the pivots
are in bold):
⎡ ⎤
1 3 0 0 3
A = ⎣0 0 1 0 9 ⎦ . (2.49)
0 0 0 1 −4
The key idea for finding the solutions of Ax = 0 is to look at the
nonpivot columns, which we will need to express as a (linear) combination
of the pivot columns. The reduced row-echelon form makes this relatively
straightforward, and we express the nonpivot columns in terms of sums and
multiples of the pivot columns that are on their left: The second column is
three times the first column (we can ignore the pivot columns on the right of
the second column). Therefore, to obtain 0, we need to subtract the second
column from three times the first column. Now we look at the fifth column,
which is our second nonpivot column. The fifth column can be expressed
as 3 times the first pivot column, 9 times the second pivot column, and −4
times the third pivot column. We need to keep track of the indices of the pivot
columns and translate this into 3 times the first column, 0 times the second
column (which is a nonpivot column), 9 times the third column (which is
our second pivot column), and −4 times the fourth column (which is the
third pivot column). Then we need to subtract the fifth column to obtain 0.
In the end, we are still solving a homogeneous equation system.
To summarize, all solutions of Ax = 0, x ∈ R5 are given by
⎧ ⎡ ⎤ ⎡ ⎤ ⎫

⎪ 3 3 ⎪


⎪ ⎢−1⎥ ⎢0⎥ ⎪

⎨ ⎢ ⎥ ⎢ ⎥ ⎬
5 ⎢ ⎥ ⎢ ⎥
x ∈ R : x = λ 1 ⎢ 0 ⎥ + λ2 ⎢ 9 ⎥ , λ 1 , λ2 ∈ R . (2.50)

⎪ ⎣0⎦ ⎣−4⎦ ⎪


⎪ ⎪

⎩ ⎭
0 −1
22 Linear Algebra

2.3.3 The Minus-1 Trick


In the following, we introduce a practical trick for reading out the solutions x of
a homogeneous system of linear equations Ax = 0, where A ∈ Rk×n , x ∈ Rn .
To start, we assume that A is in reduced row-echelon form without any rows
that just contain
⎡ zeros, i.e., ⎤
0 ··· 0 1 ∗ ··· ∗ 0 ∗ ··· ∗ 0 ∗ ··· ∗
⎢ .. .. . . .. ⎥
⎢ . . 0 0 · · · 0 1 ∗ · · · ∗ .. .. . ⎥
⎢ ⎥
⎢ .. ⎥ ,
A = ⎢ ... .. .. ..
. . .
..
. 0 .
.. .. .. ..
. . . . ⎥
⎢ ⎥
⎢ .. .. .. .. .. .. .. .. .. .. ⎥
⎣ . . . . . . . . 0 . . ⎦
0 ··· 0 0 0 ··· 0 0 0 ··· 0 1 ∗ ··· ∗
(2.51)
where ∗ can be an arbitrary real number, with the constraints that the first nonzero
entry per row must be 1 and all other entries in the corresponding column must
be 0. The columns j1 , . . . , jk with the pivots (marked in bold) are the standard
unit vectors e1 , . . . , ek ∈ Rk . We extend this matrix to an n × n-matrix à by
adding n − k rows of the!form "
0 · · · 0 −1 0 · · · 0 (2.52)
so that the diagonal of the augmented matrix à contains either 1 or −1. Then
the columns of à that contain the −1 as pivots are solutions of the homogeneous
equation system Ax = 0. To be more precise, these columns form a basis
(Section 2.6.1) of the solution space of Ax = 0, which we will later call the
kernel kernel or null space (see Section 2.7.3).
null space

Example 2.8 (Minus-1 Trick)


Let us revisit the matrix in (2.49), which is already in REF:
⎡ ⎤
1 3 0 0 3
A = ⎣0 0 1 0 9 ⎦ . (2.53)
0 0 0 1 −4
We now augment this matrix to a 5 × 5 matrix by adding rows of the
form (2.52) at the places where the pivots on the diagonal are missing and
obtain ⎡ ⎤
1 3 0 0 3
⎢0 −1 0 0 0 ⎥
⎢ ⎥
à = ⎢⎢0 0 1 0 9 ⎥ .
⎥ (2.54)
⎣0 0 0 1 −4 ⎦
0 0 0 0 −1
From this form, we can immediately read out the solutions of Ax = 0 by
taking the columns of Ã, which contain −1 on the diagonal:
⎧ ⎡ ⎤ ⎡ ⎤ ⎫

⎪ 3 3 ⎪


⎪ ⎢−1⎥ ⎢0⎥ ⎪

⎨ ⎢ ⎥ ⎢ ⎥ ⎬
x ∈ R : x = λ1 ⎢
5
⎢ ⎥0 ⎥ + λ2 ⎢ 9 ⎥ , λ 1 , λ2 ∈ R ,
⎢ ⎥ (2.55)

⎪ ⎣ ⎦ ⎣ ⎦ ⎪


⎪ 0 −4 ⎪

⎩ ⎭
0 −1
which is identical to the solution in (2.50) that we obtained by “insight.”
2.3 Solving Systems of Linear Equations 23

Calculating the Inverse


−1
To compute the inverse A of A ∈ Rn×n , we need to find a matrix X that
satisfies AX = I n . Then X = A−1 . We can write this down as a set of
simultaneous linear equations AX = I n , where we solve for X = [x1 | · · · |xn ].
We use the augmented matrix notation for a compact representation of this set of
systems of linear equations and obtain
! " ! "
A|I n  ···  I n |A−1 . (2.56)
This means that if we bring the augmented equation system into reduced row-
echelon form, we can read out the inverse on the right-hand side of the equation
system. Hence, determining the inverse of a matrix is equivalent to solving sys-
tems of linear equations.

Example 2.9 (Calculating an Inverse Matrix by Gaussian Elimination)


To determine the inverse of
⎡ ⎤
1 0 2 0
⎢1 1 0 0⎥
A=⎢
⎣1 2 0 1⎦
⎥ (2.57)
1 1 1 1
we write down the augmented matrix
⎡ ⎤
1 0 2 0 1 0 0 0
⎢ 1 1 0 0
⎢ 0 1 0 0 ⎥

⎣ 1 2 0 1 0 0 1 0 ⎦
1 1 1 1 0 0 0 1
and use Gaussian elimination to bring it into reduced row-echelon form
⎡ ⎤
1 0 0 0 −1 2 −2 2
⎢ 0 1 0 0 1 −1 2 −2 ⎥
⎢ ⎥,
⎣ 0 0 1 0 1 −1 1 −1 ⎦
0 0 0 1 −1 0 −1 2
such that the desired inverse is given as its right-hand side:
⎡ ⎤
−1 2 −2 2
⎢ 1 −1 2 −2⎥
A−1 = ⎢ ⎣ 1 −1 1 −1⎦ .
⎥ (2.58)
−1 0 −1 2
We can verify that (2.58) is indeed the inverse by performing the multipli-
cation AA−1 and observing that we recover I 4 .

2.3.4 Algorithms for Solving a System of Linear Equations


In the following, we briefly discuss approaches to solving a system of linear
equations of the form Ax = b. We make the assumption that a solution exists.
Should there be no solution, we need to resort to approximate solutions, which
24 Linear Algebra

we do not cover in this chapter. One way to solve the approximate problem is
using the approach of linear regression, which we discuss in detail in Chapter 9.
In special cases, we may be able to determine the inverse A−1 , such that the
solution of Ax = b is given as x = A−1 b. However, this is only possible if A
is a square matrix and invertible, which is often not the case. Otherwise, under
mild assumptions (i.e., A needs to have linearly independent columns) we can
use the transformation
Ax = b ⇐⇒ A Ax = A b ⇐⇒ x = (A A)−1 A b (2.59)
Moore–Penrose and use the Moore–Penrose pseudo-inverse (A A)−1 A to determine the so-
pseudo-inverse lution (2.59) that solves Ax = b, which also corresponds to the minimum norm
least-squares solution. A disadvantage of this approach is that it requires many
computations for the matrix-matrix product and computing the inverse of A A.
Moreover, for reasons of numerical precision it is generally not recommended
to compute the inverse or pseudo-inverse. In the following, we therefore briefly
discuss alternative approaches to solving systems of linear equations.
Gaussian elimination plays an important role when computing determinants
(Section 4.1), checking whether a set of vectors is linearly independent (Sec-
tion 2.5), computing the inverse of a matrix (Section 2.2.2), computing the rank
of a matrix (Section 2.6.2), and determining a basis of a vector space (Sec-
tion 2.6.1). Gaussian elimination is an intuitive and constructive way to solve
a system of linear equations with thousands of variables. However, for systems
with millions of variables, it is impractical as the required number of arithmetic
operations scales cubically in the number of simultaneous equations.
In practice, systems of many linear equations are solved indirectly, by either
stationary iterative methods, such as the Richardson method, the Jacobi method,
the Gauß–Seidel method, and the successive overrelaxation method, or Krylov
subspace methods, such as conjugate gradients, generalized minimal residual,
or biconjugate gradients. We refer to the books by Stoer and Burlirsch (2002),
Strang (2003), and Liesen and Mehrmann (2015) for further details.
Let x∗ be a solution of Ax = b. The key idea of these iterative methods is to
set up an iteration of the form
x(k+1) = Cx(k) + d (2.60)
for suitable C and d that reduces the residual error x(k+1) − x∗ in every
iteration and converges to x∗ . We will introduce norms · , which allow us to
compute similarities between vectors, in Section 3.1.

2.4 Vector Spaces


Thus far, we have looked at systems of linear equations and how to solve them
(Section 2.3). We saw that systems of linear equations can be compactly rep-
resented using matrix-vector notation (2.10). In the following, we will have a
closer look at vector spaces, i.e., a structured space in which vectors live.
In the beginning of this chapter, we informally characterized vectors as objects
that can be added together and multiplied by a scalar, and they remain objects
2.4 Vector Spaces 25

of the same type. Now we are ready to formalize this, and we will start by
introducing the concept of a group, which is a set of elements and an operation
defined on these elements that keeps some structure of the set intact.

2.4.1 Groups
Groups play an important role in computer science. Besides providing a funda-
mental framework for operations on sets, they are heavily used in cryptography,
coding theory, and graphics.

Definition 2.7 (Group). Consider a set G and an operation ⊗ : G × G → G


defined on G. Then G := (G, ⊗) is called a group if the following hold: group

closure
1. Closure of G under ⊗: ∀x, y ∈ G : x ⊗ y ∈ G associativity
2. Associativity: ∀x, y, z ∈ G : (x ⊗ y) ⊗ z = x ⊗ (y ⊗ z) neutral element
3. Neutral element: ∃e ∈ G ∀x ∈ G : x ⊗ e = x and e ⊗ x = x inverse element
4. Inverse element: ∀x ∈ G ∃y ∈ G : x ⊗ y = e and y ⊗ x = e. We often write
x−1 to denote the inverse element of x.

Remark. The inverse element is defined with respect to the operation ⊗ and does
not necessarily mean x1 . ♦
If additionally ∀x, y ∈ G : x ⊗ y = y ⊗ x, then G = (G, ⊗) is an Abelian group Abelian group
(commutative).

Example 2.10 (Groups)


Let us have a look at some examples of sets with associated operations and
see whether they are groups:
▪ (Z, +) is a group.
▪ (N0 , +) is not a group: Although (N0 , +) possesses a neutral element (0), N0 := N ∪ {0}
the inverse elements are missing.
▪ (Z, ·) is not a group: Although (Z, ·) contains a neutral element (1), the
inverse elements for any z ∈ Z, z = ±1, are missing.
▪ (R, ·) is not a group since 0 does not possess an inverse element.
▪ (R\{0}, ·) is Abelian.
▪ (Rn , +), (Zn , +), n ∈ N are Abelian if + is defined componentwise, i.e.,
(x1 , · · · , xn ) + (y1 , · · · , yn ) = (x1 + y1 , · · · , xn + yn ). (2.61)
Then, (x1 , · · · , xn )−1 := (−x1 , · · · , −xn ) is the inverse element and e =
(0, · · · , 0) is the neutral element.
▪ (Rm×n , +), the set of m × n-matrices is Abelian (with componentwise
addition as defined in (2.61)).
▪ Let us have a closer look at (Rn×n , ·), i.e., the set of n × n-matrices with
matrix multiplication as defined in (2.13).
26 Linear Algebra

– Closure and associativity follow directly from the definition of matrix


multiplication.
– Neutral element: The identity matrix I n is the neutral element with respect
to matrix multiplication “·” in (Rn×n , ·).
– Inverse element: If the inverse exists (A is regular), then A−1 is the
inverse element of A ∈ Rn×n , and in exactly this case (Rn×n , ·) is a
group, called the general linear group.

Definition 2.8 (General Linear Group). The set of regular (invertible) matrices
A ∈ Rn×n is a group with respect to matrix multiplication as defined in (2.13)
general linear group and is called general linear group GL(n, R). However, since matrix multiplica-
tion is not commutative, the group is not Abelian.

2.4.2 Vector Spaces


When we discussed groups, we looked at sets G and inner operations on G, i.e.,
mappings G × G → G that only operate on elements in G. In the following, we
will consider sets that in addition to an inner operation + also contain an outer
operation ·, the multiplication of a vector x ∈ G by a scalar λ ∈ R. We can think
of the inner operation as a form of addition, and the outer operation as a form of
scaling. Note that the inner/outer operations have nothing to do with inner/outer
products.
vector space Definition 2.9 (Vector Space). A real-valued vector space V = (V, +, ·) is a set
V with two operations
+: V ×V →V (2.62)
·: R×V →V (2.63)
where
1. (V, +) is an Abelian group
2. Distributivity:
a. ∀λ ∈ R, x, y ∈ V : λ · (x + y) = λ · x + λ · y
b. ∀λ, ψ ∈ R, x ∈ V : (λ + ψ) · x = λ · x + ψ · x
3. Associativity (outer operation): ∀λ, ψ ∈ R, x ∈ V : λ · (ψ · x) = (λψ) · x
4. Neutral element with respect to the outer operation: ∀x ∈ V : 1 · x = x
vector The elements x ∈ V are called vectors. The neutral element of (V, +) is the zero
vector addition vector 0 = [0, . . . , 0] , and the inner operation + is called vector addition. The
scalar elements λ ∈ R are called scalars and the outer operation · is a multiplication
multiplication by by scalars. Note that a scalar product is something different, and we will get to
scalars
this in Section 3.2.

Remark. A “vector multiplication” ab, a, b ∈ Rn , is not defined. Theoretically,


we could define an elementwise multiplication, such that c = ab with cj =
aj bj . This “array multiplication” is common to many programming languages
2.4 Vector Spaces 27

but makes mathematically limited sense using the standard rules for matrix
multiplication: By treating vectors as n × 1 matrices (which we usually do),
we can use the matrix multiplication as defined in (2.13). However, then the
dimensions of the vectors do not match. Only the following multiplications for
vectors are defined: ab ∈ Rn×n (outer product), a b ∈ R (inner/scalar/dot outer product
product). ♦

Example 2.11 (Vector Spaces)


Let us have a look at some important examples:
▪ V = Rn , n ∈ N is a vector space with operations defined as follows:
– Addition: x+y = (x1 , . . . , xn )+(y1 , . . . , yn ) = (x1 +y1 , . . . , xn +yn )
for all x, y ∈ Rn
– Multiplication by scalars: λx = λ(x1 , . . . , xn ) = (λx1 , . . . , λxn ) for
all λ ∈ R, x ∈ Rn
▪ V = Rm×n , m, n ∈ N is a vector space with
⎡ ⎤
a11 + b11 · · · a1n + b1n
⎢ .. .. ⎥
– Addition: A + B = ⎣ . . ⎦ is defined ele-
am1 + bm1 · · · amn + bmn
mentwise for all A, B ∈ V ⎡ ⎤
λa11 · · · λa1n
⎢ .. ⎥ as defined in
– Multiplication by scalars: λA = ⎣ ... . ⎦
λam1 · · · λamn
Section 2.2. Remember that Rm×n is equivalent to Rmn .
▪ V = C, with the standard definition of addition of complex numbers.

Remark. In the following, we will denote a vector space (V, +, ·) by V when


+ and · are the standard vector addition and scalar multiplication. Moreover, we
will use the notation x ∈ V for vectors in V to simplify notation. ♦
Remark. The vector spaces Rn , Rn×1 , R1×n are only different in the way we
write vectors. In the following, we will not make a distinction between Rn and
Rn×1 , which allows us to write n-tuples as column vectors column vector
⎡ ⎤
x1
⎢ .. ⎥
x = ⎣ . ⎦. (2.64)
xn

This simplifies the notation regarding vector space operations. However, we do


distinguish between Rn×1 and R1×n (the row vectors) to avoid confusion with row vector
matrix multiplication. By default, we write x to denote a column vector, and a
row vector is denoted by x , the transpose of x. ♦ transpose
28 Linear Algebra

2.4.3 Vector Subspaces


In the following, we will introduce vector subspaces. Intuitively, they are sets
contained in the original vector space with the property that when we perform
vector space operations on elements within this subspace, we will never leave
it. In this sense, they are “closed.” Vector subspaces are a key idea in machine
learning. For example, Chapter 10 demonstrates how to use vector subspaces for
dimensionality reduction.
Definition 2.10 (Vector Subspace). Let V = (V, +, ·) be a vector space and
vector subspace U ⊆ V, U = ∅. Then U = (U , +, ·) is called vector subspace of V (or linear
linear subspace subspace) if U is a vector space with the vector space operations + and · re-
stricted to U × U and R × U. We write U ⊆ V to denote a subspace U of V .
If U ⊆ V and V is a vector space, then U naturally inherits many properties
directly from V because they hold for all x ∈ V, and in particular for all x ∈ U ⊆
V. This includes the Abelian group properties, the distributivity, the associativity,
and the neutral element. To determine whether (U , +, ·) is a subspace of V , we
still do need to show
1. U = ∅, in particular: 0 ∈ U
2. Closure of U :
a. With respect to the outer operation: ∀λ ∈ R ∀x ∈ U : λx ∈ U .
b. With respect to the inner operation: ∀x, y ∈ U : x + y ∈ U .

Example 2.12 (Vector Subspaces)


Let us have a look at some examples:
▪ For every vector space V , the trivial subspaces are V itself and {0}.
▪ Only example D in Figure 2.6 is a subspace of R2 (with the usual inner/
outer operations). In A and C, the closure property is violated; B does not
contain 0.
▪ The solution set of a homogeneous system of linear equations Ax = 0
with n unknowns x = [x1 , . . . , xn ] is a subspace of Rn .
▪ The solution of an inhomogeneous system of linear equations Ax = b,
b = 0 is not a subspace of Rn .
▪ The intersection of arbitrarily many subspaces is a subspace itself.
B
A

D
0 0 0 0
C

Figure 2.6 Not all subsets of R2 are subspaces. In A and C, the closure property is violated; B
does not contain 0. Only D is a subspace.

Remark. Every subspace U ⊆ (Rn , +, ·) is the solution space of a homogeneous


system of homogeneous linear equations Ax = 0 for x ∈ Rn . ♦
2.5 Linear Independence 29

2.5 Linear Independence


In the following, we will have a close look at what we can do with vectors
(elements of the vector space). In particular, we can add vectors together and
multiply them with scalars. The closure property guarantees that we end up with
another vector in the same vector space. It is possible to find a set of vectors with
which we can represent every vector in the vector space by adding them together
and scaling them. This set of vectors is a basis, and we will discuss them in
Section 2.6.1. Before we get there, we will need to introduce the concepts of
linear combinations and linear independence.
Definition 2.11 (Linear Combination). Consider a vector space V and a finite
number of vectors x1 , . . . , xk ∈ V . Then, every v ∈ V of the form
k
v = λ 1 x1 + · · · + λ k xk = λ i xi ∈ V (2.65)
i=1

with λ1 , . . . , λk ∈ R is a linear combination of the vectors x1 , . . . , xk . linear combination

The 0-vector can alwaysbe written as the linear combination of k vectors


k
x1 , . . . , xk because 0 = i=1 0xi is always true. In the following, we are
interested in nontrivial linear combinations of a set of vectors to represent 0, i.e.,
linear combinations of vectors x1 , . . . , xk , where not all coefficients λi in (2.65)
are 0.
Definition 2.12 (Linear (In)dependence). Let us consider a vector space V with
k ∈ N and kx1 , . . . , xk ∈ V . If there is a non-trivial linear combination, such
that 0 = i=1 λi xi with at least one λi = 0, the vectors x1 , . . . , xk are linearly linearly dependent
dependent. If only the trivial solution exists, i.e., λ1 = . . . = λk = 0 the vectors
x1 , . . . , xk are linearly independent. linearly independent

Linear independence is one of the most important concepts in linear algebra.


Intuitively, a set of linearly independent vectors consists of vectors that have no
redundancy, i.e., if we remove any of those vectors from the set, we will lose
something. Throughout the next sections, we will formalize this intuition more.

Example 2.13 (Linearly Dependent Vectors)


A geographic example may help to clarify the concept of linear indepen-
dence. A person in Nairobi (Kenya) describing where Kigali (Rwanda)
is might say, “You can get to Kigali by first going 506 km Northwest
to Kampala (Uganda) and then 374 km Southwest.” This is sufficient
information to describe the location of Kigali because the geographic
coordinate system may be considered a two-dimensional vector space
(ignoring altitude and the Earth’s curved surface). The person may add, “It
is about 751 km West of here.” Although this last statement is true, it is not
necessary to find Kigali given the previous information (see Figure 2.7 for an
illustration). In this example, the “506 km Northwest” vector (blue) and the
“374 km Southwest” vector (purple) are linearly independent. This means
the Southwest vector cannot be described in terms of the Northwest vector,
30 Linear Algebra

and vice versa. However, the third “751 km West” vector (black) is a linear
combination of the other two vectors, and it makes the set of vectors linearly
dependent. Equivalently, given “751 km West” and “374 km Southwest” can
be linearly combined to obtain “506 km Northwest”.

Kampala
t 506
es km
hw No
t rth
Sou wes
t
km Nairobi
374 751 km West t
es
w
Kigali
u th
So
km
3 74

Figure 2.7 Geographic example (with crude approximations to cardinal directions) of linearly
dependent vectors in a two-dimensional space (plane).

Remark. The following properties are useful to find out whether vectors are
linearly independent:
▪ k vectors are either linearly dependent or linearly independent. There is no
third option.
▪ If at least one of the vectors x1 , . . . , xk is 0 then they are linearly dependent.
The same holds if two vectors are identical.
▪ The vectors {x1 , . . . , xk : xi = 0, i = 1, . . . , k}, k  2, are linearly
dependent if and only if (at least) one of them is a linear combination of
the others. In particular, if one vector is a multiple of another vector, i.e.,
xi = λxj , λ ∈ R, then the set {x1 , . . . , xk : xi = 0, i = 1, . . . , k} is
linearly dependent.
▪ A practical way of checking whether vectors x1 , . . . , xk ∈ V are linearly
independent is to use Gaussian elimination: Write all vectors as columns of a
matrix A and perform Gaussian elimination until the matrix is in row-echelon
form (the reduced row-echelon form is unnecessary here):
– The pivot columns indicate the vectors, which are linearly independent of
the vectors on the left. Note that there is an ordering of vectors when the
matrix is built.
– The nonpivot columns can be expressed as linear combinations of the pivot
columns on their left. For instance, the row-echelon form
Random documents with unrelated
content Scribd suggests to you:
ne selittämään. Kirjain, sana, sanoma on tullut hänen luokseen 60-
tuhannen peninkulman nopeudella tunnissa.

Alice kuunteli jännitetyllä tarkkuudella.

— Tuo kuulostaa unelta tai kummitusjutulta, sanoi hän. — Jos


sellaisista asioista olisi puhuttu parikymmentä vuotta sitten, ei niitä
olisi kukaan uskonut.

Palvelija, joka oli käynyt myymässä laivalehteä, oli lopettanut


käyntinsä ensi luokassa. Nyt meni hän toiseen luokkaan ja sieltä
siirtolaisosastoihin.

Useimmat matkustajat olivat kansilla. Niillä käveli, istui ja seisoi


ihmisjoukkoja, suomalaisia, ruotsalaisia, tanskalaisia, norjalaisia,
englantilaisista tietysti puhumattakaan.

Joukko juutalaisia, jotka haisivat sipulilta, istui eräässä nurkassa.


Likaisuudestaan huolimatta olivat heidän nuoret naisensa
kauniinnäköisiä.

Eräs äiti itki noin 3-vuotias tyttölapsi sylissään. Vieressä seisova,


noin 18 vuoden ikäinen poika koetti lohduttaa äitiään.

— Minä murehdin kovasti Einoa. Se poika vasta on kiusankappale


vanhemmilleen, kun ei lähtenyt mukaan. Minä en voi käsittää, mikä
häntä riivasi, huokaili äiti.

— Älkää surko. Kyllä Eino siitä oppii, kun tulee vanhemmaksi. Ehkä
hän malttaa mielensä ja tulee myöhemmin Amerikkaan, lohdutti
poika.
— Kyllä se Eino oli kummallinen, kun sanoi, ettei hän lähde
meidän kanssamme hukkumaan. Hän tahtoi ennustaa, että tämä
laiva hukkuisi.

— Hyvää päivää! Saanko kysyä, mistä ollaan, kuului samassa


osanottoa todistava miehenääni tuon naisen sivulta.

— Hyvää päivää! Me olemme Rauman kaupungin läheltä. Mieheni


on
Amerikassa, ja me menemme hänen luokseen.

— Mutta minä kuulin äsken, ettette saanut mukaanne kaikkia


lapsianne, sanoi puhuttelija, joka ei ollut kukaan muu kuin Onni
Laurila.

— En saanut, vastasi vaimo. — Eino-poika ei tahtonut lähteä


mistään hinnasta matkaan.

— Mistä syystä ei?

— No sanokaas sitä. Poika väitti, että me hukkuisimme matkalla,


ja ettei hän haluaisi hukkua meidän mukanamme.

Syvä huokaus pääsi Laurilan rinnasta, ja hänen huulensa liikkuivat.

— Tyyne, sanoi hän puoliääneensä.

Laurila näytti olevan syvällisen mielenliikutuksen valtaamana.


Mutta hän koetti hillitä tunteitaan ja kääntyi raumalaiseen äitiin,
kysyen:

— Kuinka vanha on se poikanne, joka niin ennusti?

— 10 vuoden ikäinen.
— Ja Einoko on hänen nimensä?

— Niin on.

— Väittikö poika todella, että tämä laiva hukkuisi, kysyi Laurila.

— Ihan todella.

— No ettekö sitten antaneet hänen ennustukselleen mitään arvoa?

— En tietenkään. Jos olisimme Einon puhetta uskoneet, emme


mekään olisi lähteneet matkaan. Mutta mitä syytä olisi pelätä, että
laiva hukkuisi? Matkustaahan ihmisiä alinomaa Amerikkaan ja sieltä
takaisin. En ainakaan minä ole kuullut muun kuin erään laivan — en
muista sen nimeä — hukkuneen.

— "Norge" oli sen laivan nimi, täydensi äidin takana seisova poika
Vihtori.

— Juuri niin, vakuutti Laurila. — "Norge" oli tanskalaisen


Thingvalla-linjan laiva ja ajoi — muistaakseni 1904 — Rockallin
karille Skottlannin pohjoispuolella.

— Menemmekö mekin sen karin vierestä, kysyi mainittu Vihtori-


poika.

— Emme, vastasi Laurila. Ainoastaan Thingvalla-linjan laivat ajavat


sitä tietä, koska eivät ollenkaan poikkea Englannissa, selitti Laurila.
Sillä reitillä, jota tämä "Titanic"-laiva kulkee, ei ole mitään karia.
Meri on kaikkialla hirmuisen syvä, keskimäärin viisi kilometriä.

— Herra jumala! Onko meidän allamme nyt sellainen syvyys,


huudahti äiti. Hänen sylissään oleva lapsi alkoi itkeä.
— Äiti, miksi ei Einokin ole täällä, kysyi lapsi.

— Eino tulee sitten myöhemmin, lohdutti äiti.

— Menevätkö Salli, äiti ja Vihtori mereen, kysyi lapsi. Tytön nimi


oli näet Salli.

— Emme, lapseni, mereen mene. Isää me menemme katsomaan,


sanoi äiti.

— Mistä syystä tuo lapsi niin puhuu, kysyi samassa toinen


miesääni.
Kysyjä oli Saarela, joka myös oli tullut paikalle.

— En minä voi ymmärtää, selitti äiti huolestuneena. — Sen verran


osaan sanoa, että lapsen veli 10 vuoden ikäinen Eino-poikani ei
tahtonut lähteä matkaan meidän kanssamme, koska uskoi laivan
hukkuvan.

— Mitä sinä, veli, arvelet tällaisesta ennustuksesta ja pelosta, kysyi


Laurila Saarelalta. — Eikö se tunnu omituiselta?

— Niin se tuntuu, vaikka en minä puolestani mitään vaaraa usko


tarjona olevan, vastasi Saarela.

— Saanko kysyä, mikä on sukunimenne, kysyi Laurila.

— Rosblom, vastasi äiti.

— Kuinka kauas aiotte matkustaa?

— Oregonin Astoriaan. Mieheni on siellä.


— Mutta mitä te arvelette tuon Eino-poikanne pelosta? Oliko hän
ennen ollenkaan ollut merellä?

— Kyllä. Ei hän muuten vettä pelännyt. Sentähden tuntuukin niin


merkilliseltä, ettei häntä hyvällä eikä pahalla saatu lähtemään
matkaan, sanoi äiti, jonka silmiin tulivat kyynelet.

— Minä en luule olevani taikauskoinen, mutta sittenkin uskon, että


tuon pojan pelko välttämättä johtui jostakin syystä, sanoi Laurila.

— Asia on sitäkin omituisempi, kun pojat tuossa iässä ovat kovin


seikkailuhaluisia, selitti Saarela.

— Se on minunkin käsitykseni, sanoi vaimo Helena Vilhelmina


Rosblom. — Mielellään meidänkin Eino olisi tahtonut maailmaa
katsella, mutta ei se vaan Amerikkaan lähtenyt. Voitteko te, hyvät
herrat, selittää, mikä poikaa tässä tapauksessa pelotti?

— Vaikea sitä on selittää, vastasi Saarela. — Muuten minusta


tuntuu, että lasten ennustuksissa tavallisesti on perää enemmän kuin
täysi-ikäisten.

— Te saatatte minut levottomaksi, huokasi äiti.

— Älkää huolehtiko. Kaitselmuksen käsissä me olemme merellä


yhtä hyvin kuin maallakin, lohdutti Laurila. — Mutta koska olemme
joutuneet keskusteluun, en tahdo teiltä salata, että eräs
naistuttavani minun kotiseudullani Pohjanmaalla ennusti samaan
suuntaan kuin teidän Eino-poikannekin.

— Mutta ette tekään uskonut tuon henkilön ennustusta, koska


lähditte matkaan, sanoi vaimo.
— En tietenkään. Nykyaikana on hyvin vaikeata uskoa
ennustuksia. Eikä niitten sitäpaitsi tarvitse kirjaimellisesti
merkitäkään sitä, mitä ne ovat tarkottavinaan.

— Niin minäkin tahtoisin uskoa, sanoi vaimo


tyynemmännäköisenä.

— Mutta sopiihan meidän olla varovaisia, jos oma


varovaisuutemme jotakin merkitsee, selitti Saarela.

— Laivaa ei karittomalla valtamerellä voi uhata mikään muu vaara


kuin törmäys joko toiseen laivaan tai jäävuoreen, sanoi Vieremä,
joka oli myös tullut paikalle. — Minä olen miltei lukemattomia kertoja
kulkenut Atlannin poikki ja tullut sen asian tarkasti tietämään.

— Onko tällä isolla merellä jäävuoria? Onko näin suuri meri myös
jäässä talvisin, kysyi vaimo Rosblom.

— Kyllä täällä keväisin ajelehtii jäävuoria, mutta ne eivät ole


kotoisin tästä vaan Pohjoisjäämerestä, josta ne ajelehtivat tänne,
selitti Vieremä.

— Eikö näin iso laiva voi niitä särkeä, kysyi Vihtori-poika.

— Ei, hyvä lapsi, vastasi Vieremä. — Ne ovat suunnattoman


vahvoja.
Ainoa keino on välttää niitä.

Samassa kiintyi seurueen huomio erääseen naiseen ja mieheen,


jotka pitäen toisiaan käsipuolesta lähestyivät verkalleen.

— Mikä kirkas esine tuon naisen kaulassa riippuu, kysyi vaimo


Rosblom.
— Se on kallisarvoinen jalokivi, vastasi Vieremä.

— Kylläpä ihmiset ovat turhamaisia, kun pitävät tuollaisia helyjä


kaulassaan, tuumi vaimo.

— Kyllä meikäläisten mielestä, mutta heidän käsityksensä on


toinen.

— Kyllä kai se tuollainen hely maksaakin muutaman sataa


markkaa, arveli vaimo.

— Ei satoja vaan satojatuhansia. Kiven hinta on satumaisen suuri.


Se maksoi viimeksi 450-tuhatta frangia eli yhtä monta meidän
markkaa.

— Yhtä paljon kuin puoli Rauman kaupunkia, huudahti Vihtori


Rosblom.

— Onpa se pari sitten rikas, tuumi vaimo.

— Ainakin pinnalta katsoen, sanoi Vieremä nauraen. — Mutta jos


pantaisiin toimeen tarkka tutkimus noitten ihmisten varoista, voisivat
ne kuivua hyvin pieneen.

— Tunnetteko te, herra, sitten nuo ihmiset, kysyi vaimo.

— Kyllä, vastasi Vieremä hymyillen. — Tuo nuori nainen on


amerikkalaisen miljoonapohatan Mc Deanin ainoa tytär, nimeltä Alice.

— Entä hänen miehensä?

— Ei tuo herra vielä ole hänen miehensä. Vastahan se yrittää


päästä.
— Ai, se on sulhaspoika, sanoi vaimo hymyillen. — Onko sekin
amerikkalainen?

— Ei, vaan italialainen. Mies on kotoisin Venetsiasta ja hänen


nimensä on ruhtinas Uffiezi.

— Ruhtinas, huudahti vaimo. — Ensi kertaa eläessäni näen


ruhtinaan.
Mutta aivanhan se on muitten ihmisten näköinen.

Koko seurue räjähti raikuvaan nauruun.

— Mitähän kansallisuutta nuo lienevät, kysyi Alice toveriltaan. Pari


oli näet tullut lähelle seuruetta. Ai, mutta minä tunnen nuo kolme
herraa, jotka on esitetty minulle. Tuo vaimo on varmaankin samasta
maasta, koska he puhuttelevat häntä.

— Mutta mille he niin sydämellisesti nauroivat, kysyi ruhtinas


Uffiezi.

— Tädin kirkas silmä, huudahti samassa pikkutyttö, juosten


katsomaan lähemmältä Alice Mc Deanin sinistä timanttia.

— Mitä tämä pieni lemmitty sanoo, kysyi Alice Vieremältä.

— Hän puhuu tädin kirkkaasta silmästä, selitti tämä.

— Ai, lapsi tarkottaa minun sinistä timanttiani, sanoi Alice. Samalla


otti hän kukkaronsa ja antoi sieltä lapselle hopeashillingin. Ruhtinas
Uffiezi seurasi esimerkkiä ja antoi toisen shillingin.

Iloisena juoksi lapsi näyttämään rahoja äidilleen.


— Menkäämme pois täältä. Täällä haisee köyhältä väeltä, sanoi
Uffiezi ranskaksi Alicelle, arvellen, etteivät nuo köyhät häntä
ymmärtäisi. Samassa he käänsivät selkänsä ja lähtivät pois.

Saarelan kasvoista kuvastui suuttumuksen ilme.

— Mokoma ruhtinas, sanoi hän. Eikö sinun kurjassa isänmaassasi


ole sitä lajia väkeä tarpeeksi? Lakasisit ensin oman kynnyksesi
edustan. Vai onko sinun pinnallinen loistosi omaa ansiotasi?

— Eipä taida olla, nauroi Vieremä. — Jos tuo upea herra pantaisiin
veloista ahtaalle, ei hänen takkiinsa jäisi nappeja.

Taas uusi naurunremahdus.

— Sentähden hän tuota kultalintua niin pyydystääkin, sanoi


Saarela. —
Mutta saa vaan nähdä, onnistuuko hänen pitää lintua häkissä.

— Siinä on uusi ennustus, jonka minä toivoisin toteutuvan veli


Saarelan hyväksi, sanoi Laurila leveästi nauraen.

— Sitä minäkin toivon, säesti Vieremä.

Saarelan poskille nousi puna.

— Tiedättekö, mitä minä soisin, kysyi Saarela.

— Mitä, kysyivät Vieremä ja Laurila ikäänkuin yhdestä suusta.

— Että tuo kultalintu saattaisi pyydystäjänsä oikein ahtaalle.

— Se on soma aate. Silloinpa nähtäisiin, onko tuo uljas kavaljeeri


sisäisesti sitä, miltä hän pinnalta nähden näyttää, sanoi Laurila.
— Mutta millä tavalla se ahtaallepano tapahtuisi? Te ymmärrätte,
että tyttö haluaa ruhtinattaren arvonimeä yhtä paljon kuin ruhtinas
tytön rahoja, selitti Laurila.

— Tämä merimatka ei ole vielä lopussa, alkoi Vieremä. —


Otaksutaan, että ne ennustukset, joista olemme kuulleet puhuttavan,
toteutuvat.

— Ettäkö laiva hukkuisi, kysäsi Saarela hätäisesti.

— Hukkuminen ei tietenkään tule kysymykseen, vastasi Vieremä.


— Mutta otaksutaan, että laiva törmää jäävuoreen ja saa pienen
vuodon.

— Entä sitten, kysyi Laurila.

— Sitten syntyisi laivalla pakokauhu. Vedenpitävät kammiot


sulettaisiin kyllä heti ja laiva jatkaisi hiljaisella vauhdilla matkaansa.
Mutta minä uskaltaisin melkein lyödä vetoa, että tuo uljas kavaljeeri
ei silloin enää niin liehakoisi tuota naista, vaan olisi huolissaan
omasta turvallisuudestaan, selitti Vieremä.

Saarela nauroi täyttä kurkkua.

— Veli Saarelan naurussa kuulin minä jotakin ritarillista, sanoi


Laurila. — Uskallanpa ennustaa, että tämä mies tuollaisessa
tapauksessa näyttelisi tuon ruhtinaan osaa mutta aivan toisella
tavalla.

— Melkeinpä soisin tuon ennustuksen toteutuvan, sanoi Vieremä.


— Se näet ei merkitsisi laivan hukkumista, vaan makeilevan
kavaljeerin lujallepanemista.
— Mutta jos ei ruhtinas olisi millänsäkään, jos ei hän joutuisikaan
pakokauhun valtaan, sanoi Laurila.

— Minä tunnen häntä lähemmältä kuin te ja moni muu, nauroi


Vieremä. — Joku aika sitten tarjoutui Atlannilla hyvä tilaisuus
koetella miehen rohkeutta ja pelkäämättömyyttä. Laivan
potkurinnapa katkesi jostakin syystä. Minä seurasin tuon miehen
kasvojenilmeitä ja näin, että hän oli kovan pelon vallassa, vaikka
mainittu tapaus ei vielä merkinnyt laivan uppoamismahdollisuutta.
Purjeet levitettiin ja niitten avulla päästiin hitaasti liikkumaan Irlannin
rannikkoa kohti. Laiva käännettiin näet takaisin.

— Mutta oliko miehellä silläkin matkalla joku lemmitty, kysyi


Laurila.

— Oli eräs ranskatar.

— Oliko se kultalintu?

— Nähtävästi. Muutenkos hän olisi sille ollut niin makea?

— No kuinka sitten kävi?

— Hyvin yksinkertaisesti siten, että mies näytteli "heikomman


astian" osaa. Naisen oli lohdutettava häntä, vaikka ei edes ollut
todellista hätää.

— Kerro enemmän, pyysi Laurila.

— Maihin päästyämme jouduimme taas samaan laivaan ja


matkasimme länttä kohti.

— Vieläkö ruhtinas ja se ranskalainen kultalintu kuhertelivat?


— Eivät. Nainen vältti hänen seuraansa eikä ollut enää
tuntevinaan häntä. Muuten on minun vakaumukseni se, ettei tuo
mies edes ole mikään ruhtinas, vaan että hän käyttää sellaista
arvonimeä pyydystystarkotuksiinsa.

— Siinä tapauksessa, että laiva kärsisi jonkin vaurion tällä


matkalla, kävisi kai samalla tavalla, arveli Laurila.

— Aivan varmasti. Uskallan lyödä vetoakin, vakuutti Vieremä. —


Se vaurio olisi ratkaseva tapaus. Tämä nykyinen kultalintu ei enää
senjälkeen välittäisi koko makeasta kavaljeerista.

*****

Alice Mc Dean oli seurueeneen kulkenut laivan joka sopukassa ja


nähnyt kaikki, mikä oli näkemisen arvoista. Taitava opas, joka osasi
kaikki selittää, oli mukana. Viimeksi oli hän käynyt konehuoneessa.

Oli murkinanaika tulossa, ja nuori pari käveli kannella edestakaisin


lisätäkseen ruokahaluaan.

Alice oli mieltynyt Uffiezin ulkomuotoonkin, vaikka tietysti


"ruhtinattaren" arvo häntä enimmin viehätti. Euroopanmatkalle
lähtiessään oli hän kyllä mennyt kihloihin erään bostonilaisen
liikemiehen Jim Winslowin kanssa. Mutta voihan kihlauksen purkaa.
Muuten ei hänen tarvinnut pelätä mitään Jimin puolelta, sillä tämä oli
tyynenluontoinen.

Kello soi, ja matkustajat menivät murkinalle. Alice ja Uffiezi olivat


melkein kahdenkesken kannella. He eivät pitäneet kiirettä mennä
ruoalle. Nyt tarjoutui Uffiezille hyvä tilaisuus tehdä tunnustuksensa.
Alice näki tämän silmistä, että sellainen oli tulossa, mutta hän ei
pelännyt vaan odotti sitä. Mutta kun ei tunnustusta ruvennut
kuulumaan, ehdotti Alice, että mentäisiin murkinalle.

Nyt tarttui Uffiezi tytön molempiin käsiin, katsoi häntä silmiin ja


sanoi hieman värisevällä äänellä:

— Alice! Ette saa mennä ennenkuin olen puhunut teille muutaman


sanan, ennenkuin olen tehnyt teille erään kysymyksen, johon odotan
vastaustanne. Sallitteko minun jäädä luoksenne koko elämänijäksi?
Saanko aina olla vieressänne, kuten näinä onnellisina päivinä tässä
laivassa?

Alice oli unelmiensa perillä. Ruhtinattaren arvonimi oli nyt varma.


Hänen tarvitsi vaan ojentaa kätensä ja ottaa se vastaan. Mutta
vaikka hän ulkopuolisesti oli tyyni, ei hän voinut estää sydäntään
lyömästä nopeammin kuin tavallisesti. Ei kuitenkaan olisi näyttänyt
viisaalta, että hän olisi heti antautunut. Ainakin muodon vuoksi täytyi
hänen tehdä jonkinmoisia vastaväitteitä.

— Mutta minä olen kuullut, hyvä ruhtinas, että olette matkalla


yksinomaan liikeasioissa, alkoi hän. — Te tilaisitte Amerikasta suuren
joukon sotatarpeita ja palaisitte heti kotimaahanne mennäksenne
sotanäyttämölle.

— Te olette saaneet vääriä tietoja, riensi ruhtinas oikasemaan. —


Ei minua tarvita Italiassa. Siellä on kyllä miehiä. Ei ole vielä tullut se
aika, että kutsuttaisiin mies talosta sotaan, kuten tapahtui suuren
Viktor Emanuelin aikana. Jos se tulee, rientää ruhtinas Uffiezi
ensimäisenä lippujen alle. Mutta jos te, Alice, torjutte minut
luotanne, niin palaan Amerikasta heti kotio ja menen etsimään
kuolemaa Tripoliksen taistelutanterelta. En voi elää ilman teitä.
Alice tuli liikutetuksi. Hän oli kyllä pitänyt varmana, että ruhtinas
halusi vaan päästä käsiksi hänen rahoihinsa, mutta nyt alkoi hän
uskoa, että Uffiezi pitäisi hänen personastaankin. Hän päätti panna
miehen koetukselle.

— Te sanoitte, ruhtinas, ettette voisi elää ilman minua. Mutta


kuinka kävisi siinä tapauksessa, että teidät pyydettäisiin kuolemaan
minun tähteni!

Ruhtinas hymyili. Hän tiesi voittaneensa. Jos Alice olisi tahtonut


torjua hänet luotaan, olisi hän tehnyt sen heti, käyttäen sitä
säälimätöntä suoruutta, joka on nuorille amerikattarille ominaista.
Hän ymmärsi, että Alice vaan näön vuoksi hieman mutkaili. Nytpä
hänkin voisi näytellä osansa hyvin.

— Kuolla, huudahti Uffiezi teeskennellyn kiihkeänä. — Minäkö en


kuolisi teidän tähtenne? Käskekää, ja minä hyppään heti mereen.
Käskekää, ja minä ruhjoutan potkureilla itseni kuoliaaksi.

— Jumalan tähden, huusi Alice ja tarttui miehen käteen, koska


näytti siltä kuin hän olisi odottanut käskyä pannakseen heti sen
täytäntöön. — Älkää jumalan tähden tehkö mielettömyyksiä vaan
menkää sen sijaan puhuttelemaan isää ja sanokaa tälle, että hänen
ainoa tyttärensä aikoo mennä naimisiin ruhtinas Uffiezin kanssa.

Mc Deanin ja nuoren ruhtinaan välinen keskustelu kesti


tuntikausia. Kun miehet viimein tulivat ulos Deanin loistohyteistä,
kävivät he käsi kädessä ja tilasivat pullollisen samppanjaa. Se
tyhjennettiin eräänlaisella juhlallisuudella, kuten lähellä olevat
helposti huomasivat. Pian oli laivassa kiivaan pohdinnan alaisena
kysymys, tulisiko ruhtinas Uffiezista ja Mc Deanin tyttärestä pari.
Alice istui päivällispöydässä harvinaisen komeasti puettuna.
Sininen timantti riippui hänen kaulassaan platinaketjussa. Se
kimalteli kuin taivaan tähti. Miljoonamiesten rouvat katselivat tuota
tyttöä karsain silmin. He kadehtivat häntä. Muutamat arvelivat, että
oli uhkapeliä noin nuoren tytön esiintyä sellaisessa häikäilevässä
upeudessa ja komeudessa.

Niitten joukossa, jotka kaukaa ihailivat Alicea, oli Toivo Saarela.


Tytön viehättäväisyys näytti lumoavan hänet siihen määrään, ettei
hän muistanut pistää montaakaan ruokapalaa suuhunsa.

Niilo Vieremä nautti Saarelan käytöksestä kenties enemmän kuin


tämä
Alicen kauneudesta.

— Ei näy ruumis tarvitsevan maallista hyvyyttä sielun


herkutellessa, sanoi hän leikillisesti.

Laurilalta pääsi äänekäs nauru.

— Ei tässä joka mies vaan uskaltaisi lähennellä miljoonamiehen


tytärtä.

— Niin, ja ruveta ruhtinaan kilpakosijaksi. Laurila nauroi taas


ääneensä.

— Ette uskone, mille minä nyt nauran, sanoi hän.

— Minulle tietysti, sanoi Saarela vähän alakuloisen näköisenä.

— Enpä suinkaan, vakuutti Laurila. — Minua naurattaa se seikka,


että me uskallamme tässä puhua ääneemme arkaluontoisista
asioista. Kun puhumme suomea, ei meitä tässä seurapiirissä kukaan
ymmärrä. Täällä ei ole muita suomalaisia matkustajia kuin me.

— Eipä taida olla, sanoi Vieremä. — Muut suomalaiset ovat


kolmasluokkalaisia. Meillä on se etu, että saamme tehdä havaintoja
rahaylimystön keskuudessa, vaikka itse olemme köyhiä.

— Mutta ethän sinä, Vieremä, enää köyhä ole, huomautti Laurila.



Olet Amerikassa ansainnut pienen pääoman.

— Minun pääomani on niin pieni, että olen ryysyköyhälistöläinen


useimpiin täkäläisiin verrattuna, sanoi Vieremä. — Mutta minkäs nuo
upporikkaat minulle voivat, kun olen ostanut matkalipun toiseen
luokkaan.

— Ja pukusi on moitteeton, lisäsi Laurila.

— Mutta me olemme joutuneet pois oikealta suunnalta, huomautti


Vieremä.

— Onko laivan suuntaa muutettu, kysyi Saarela.

— Ei minun tietääkseni. Keskustelumme suuntaa minä tarkotin.

— Ai, meidänhän piti jatkaa niistä naima-asioista, sanoi Laurila


vakavannäköisenä.

Saarela puri huuleensa. Nyt alkoivat hänen parhaat ystävänsä tulla


liian pisteliäiksi. Sellaista se on. Hyvätkin ystävät joutuvat
epäsopuun, liikkuessaan lemmenasiain lumotulla maaperällä.
— Minä kysyn sinulta avoimesti, sanoi Laurila Saarelaan kääntyen,
— uskallatko todella ruveta ruhtinas Uffiezin kilpakosijaksi.
Etelämaalaiset ovat kuumaverisiä. Jonakin kauniina päivänä voi
ruhtinaallinen vastustajasi vaatia sinut kaksintaisteluun.

— Mutta jos Jim Winslow vaatii ruhtinaan ennenkuin tämä


Saarelan, nauroi Vieremä.

— Ai, siitä tulee vielä hauska juttu, huudahti Laurila. — Tuon


kultakanan omistusoikeudesta tulee epäilemättä taistelemaan kolme
uljasta miestä, yksi amerikkalainen liikemies, yksi italialainen
ruhtinas ja yksi suomalainen maisteri, joka on "köyhä kuin kirkon
rotta". Hah, haa!

Saarela oli kuin uhrikaritsa kahden toverinsa välillä.

— Älkäähän nyt tuosta asiasta niin suurta numeroa tehkö, sanoi


hän. — Tehän tiedätte yhtä hyvin kuin minäkin, etten minä
suoranaisesti voi tuota tyttöä lähennellä. On kokonaan toinen asia,
että ihailen hänen kauneuttaan. Sanoohan suomalainen
sananlaskukin, "että katsoa saa mutta ei kajota".

— Miksi ei kajotakin saisi, jos vaan kykenee puolustautumaan,


nauroi
Vieremä.

— Mutta minä en puolustaudu, ainakaan tuollaisissa asioissa,


vakuutti
Saarela.

— Mitä tekisit siinä tapauksessa, että ruhtinas Uffiezi kutsuisi sinut


kaksintaisteluun Alicen omistusoikeudesta, kysyi Laurila.
— En mitään. Sanoisin korkeintaan, etten ole millään tavalla
pyrkinytkään tyttöä omistamaan.

— Ai, sinä ihailet siis Alicea paljaastaan taiteelliselta näkökannalta,


ehätti Vieremä huomauttamaan.

— Ehkä niin. Voinhan teille sanoa vakaumukseni lemmenasioihin


nähden. En koskaan aio naista omistaa enkä saada häntä haltuuni
millään kaappausoikeudella.

— Siinä tapauksessa sinä et siis voisi avoimesti kosiakaan, väitti


Vieremä.

— En tietysti.

— Pysyt siis virallisesti naimattomana koko ikäsi, sanoi Laurila.

— Sitä en tiedä.

— Etkö tiedä, kysyi Vieremä. — Kuinka voisit joutua muodolliseen


avioliittoon yhdenkään naisen kanssa, jos et kosi?

— Hän odottaa naisen kosivan, riensi Laurila huomauttamaan.

— Arvasiko toveri paikoilleen, kysyi Vieremä.

— Ei läheskään.

— Sittenpä olet arvotus, sanoi Laurila.

— Voin olla. En pyri avioliittoon enkä halua millään tavalla omistaa


naista. Siitä huolimatta voin ihailla kaukaa miellyttäviä naisia.
— Mitä tuollainen ihailu merkitsee? Voineeko se tyydyttää sinua
koko ikäsi, kysyi Laurila.

— En uskalla puhua mitään tulevaisuudesta.

*****

Mc Deanin pöydässä istujat eivät aavistaneet, mistä nuo miehet


puhuivat. Heillä oli oma puheenaineensa, joka koski Alicen sinistä
timanttia.

— Tietysti kaikki se, mitä tästä jalokivestä puhutaan, perustuu


paljaaseen taikauskoon, sanoi ruhtinas Uffiezi, luoden puolittain aran
ja pelonsekaisen katseen Alicen kaulassa olevaan siniseen timanttiin.
— Ei sellaisille puheille enää nykyisen valistuksen aikana arvoa
anneta.

— Mutta miten on teidän katolilaisten laita, kysyi Mc Dean. Ettekö


omista esimerkiksi madonnakuvallenne ihmeitätekevää voimaa? Eikö
Italiassa uskota "pahan silmän" vaikutukseen? Jos niin on laita, eikö
sellainen usko myös perustu taikuuteen?

— Ai, nyt te puhutte ihan toisista asioista, huudahti Uffiezi.

— Muodollisesti kyllä toisista, mutta asiallisesti samanluontoisista,


väitti Mc Dean. — Sallikaa minun lausua oma mielipiteeni juuri
madonnankuvan vaikutuksista, joita en suinkaan voi kieltää.

Uffiezi kuunteli korvat hörössä.

— Minusta on tuo kuva hurskastoivoisten ihmisten magnetisoima.


Tuhannet ovat vuosisatoina katselleet sitä hartaudella, joten sen
ympärille on muodostunut näkymätön, hyvyyttä uhkuva ilmakehä.
Tämä on kuvan ainoa asiallinen voima.

— Voi olla. Minä en osaa selittää tuollaisia asioita, sanoi ruhtinas.

— En minäkään tunne luonnon salaisia voimia, jatkoi Mc Dean. —


Mutta minusta tuntuu siltä, että on olemassa meille tavallisille
ihmisille aavistamattomia voimia ja näkymättömiä johtolankoja, jotka
sitovat ihmisten kohtalot toisiinsa, vaikka eivät kohtalonalaiset ole
asiasta tietoisia. En minä voi uskoa, että mikään tapaus olisi
sattuman varassa, kuten tähän aikaan paljaasta tottumuksesta
väitetään. Kaikella on alkusyynsä ja seurauksensa. Jokainen
tapahtuma on rengas kohtalojen loppumattomassa sarjassa, joka on
alkanut aikojen alussa, ja joka loppunee vasta maailmankaikkeuden
suuressa levossa. Meissä uinuvat voimat, joita emme tunne, siirtyvät
esineihin, joita pitelemme, kuten esimerkiksi sähkö syntyy ja kehittyy
epäelimellisistä olijoista. Miksi eivät siirtyisi ne epäsointuiset voimat,
jotka ovat onnettomuuden ja kuoleman välittäjinä? Tämä timantti,
joka sukupolvien vieriessä on vaeltanut onnettomasta kädestä
toiseen — — —

Alice tarttui siniseen timanttiin.

— Voi isäkulta, älä tänä iltana puhu onnettomuudesta ja


kuolemasta, pyysi hän. — Salli minun olla onnellinen silloin kun voin.
Sitäpaitsi on ruhtinas jo sanonut, että sinisen timantin huonot
ominaisuudet ovat muuttuneet hyviksi senjälkeen kun se joutui
minun huostaani.

Päivällisen jälkeen kokoontuivat eri salongeissa olevat matkustajat


kuulemaan soittoa. Soittokunta esitti parhaat kappaleensa, ja eräs
mukana ollut kuuluisa amerikkalainen laulajatar antoi avustustaan.
Nuoriso keskusteli. Tupakkasalongissa väittelivät herrat siitä
nopeudesta, jolla laiva kulki. Muutamat ammattipelurit olivat saaneet
joukkoonsa erään "oppimattoman" ja tarjoutuivat nyt kilvalla
opettamaan tätä.

Komentosillalla kävelivät yövartijat edestakaisin, huutaen tämän


tästä: "Kaikki hyvin!" Taivas oli tähtikirkas, ja "Titanic" kulki suurinta
vauhtiaan.

— Piru vieköön, sanoi eräs vahtijoista. — Tänä iltana kuulin


kerrottavan, että sininen timantti on laivassa. Se merkitsee
onnettomuutta. Jos saisin sen käsiini, heittäisin sen arvelematta
syvimmällä kohdalla mereen.
VI LUKU.

Tuhonsaattaja.

Kaukana pohjolassa, Grönlannissa, maailman suurimmalla saarella,


joka on yli 2 miljoonan neliökilometrin laajuisen jääkentän peittämä,
paistaa kesän lämmin aurinko häikäisevän valkeitten tasankojen yli.
Kaikkialla vallitsee hiljaisuus ja äänettömyys. Ainoastaan jokin
merenpinnalla loikova hylje tai lintu silloin tällöin keskeyttää
huudollaan hiljaisuuden. Jäänkappaleita liukuu hiljalleen merivirran
mukana rannikkoa pitkin. Mitään kauppalaivoja ei koskaan näy.

Mutta eräänä päivänä kuuluu kauhea paukaus, ikäänkuin


suunnattoman suurella panoksella räjäytettäisiin kallionlohkare irti.
Ääni kuuluu tuhatkertaisena kaikuna jääseinistä takaisin. Kaikki
elävät olennot pelästyvät. Linnut nousevat korkeuteen ja hylkeet
sukeltavat syvyyteen. Eräs suurista jäävuorista on "poikinut", kuten
sanotaan. Jättiläisjäämöhkäle, joka painaa satojatuhansia tonneja,
on irtaantunut emävuoresta ja syöksynyt mereen. Se vajoaa puolen
korkeuttaan ja kohoaa taas ylös. Sitten kiekahtaa se muutaman
kerran ympäri, kunnes saavuttaa tasapainonsa.
Suunnattoman suuri jäämöhkäle, täydellinen vuori, liukuu
hiljalleen eteläänpäin. Se kohoaa toista sataa jalkaa vedenpinnan yli,
ulottuen enemmän kuin tuhannen jalan syvyydellä vedenpinnan
alapuolelle. Sinerviä ja hopeanhohtoisia luolia näkyy sen sivuilla. Sen
huippu on satulinnan huipun kaltainen. Juhlallisennäköisenä liukuu
se viikko viikolta yhä kauemmaksi rannasta. Eräänä päivänä saa se
seuralaisekseen toisen jäävuoren, itseään vielä
haaveellisennäköisemmän. Tuo kammottava jäävuorikulkue saa uusia
seuralaisia Baffinin lahdesta ja Davisin salmesi.

Tänä keväänä liukuivat jäävuoret kauemmaksi etelään kuin


tavallisesti. Ne lyöttäytyivät yhteen, muodostaen useamman
kymmenen neliöpeninkulman laajuisen jäämanteren, jonka
esijoukkona kulki lukemattomia pienempiä jäälohkareita. Ne
jäähdyttivät veden ja ilman tavattoman kylmäksi. Ne soluivat suurien
Atlannin-laivojen kulkuväylille, tehden merenkulun epävarmaksi.
Aaveittentapaisina olivat ne piilossa, odottaen saalista. Ja voi niitä,
jotka joutuivat koskettamaan niitten teräviä reunoja!

Musta höyrylaivanrunko kiiti hyvää vauhtia usvan halki. Tähystäjän


jännitetyt silmät eivät nähneet muuta kuin epätasaista, harmaata
sumua, joka lainehti edestakaisin, tehden eteennäkemisen
mahdottomaksi. Höyrypilli vihelsi, ja vartija seisoi käsi
konehuoneeseen johtavassa sähköttimessä.

Äkkiä oli laiva jäitten keskellä. Jäät olivat irtonaisia laattoja, jotka
eivät suorastaan olleet vaarallisia laivalle, mutta jotka kovan
kylmyyden yhteydessä todistivat suuremman jäävuoren olevan
lähellä. Tähystäjän tarkkaavaisuus tulee kaksinkertaiseksi. Kapteeni,
joka oli varovainen mies, hiljensi kulkua. Laiva kulki puolella
vauhdilla, murtaen keulallaan jäänlohkareet. Potkurien työ oli
raskasta, kun ne liikkuivat sakeassa jäänsohjussa.

Mutta nytpä ilmestyi sumusta jättiläismäinen valkea kummitus,


joka oli monta sataa jalkaa korkea. Jäävuori! Tähystäjä antoi
hälyytyksen, konehuoneen sähkökello soi, ja potkurit alkoivat pyöriä
päinvastaiseen suuntaan. Ainoastaan muutaman kymmenen metrin
päässä jäävuoresta pysähtyi laiva. Kapteeni ja perämiehet päästivät
helpotuksen huokauksen ja onnittelivat toisiaan.

— Se oli lähellä silmää, herrat, sanoi kapteeni. — Jos tämä


kohtaus olisi sattunut yöllä, olisimme olleet hukassa. Nyt on meidän
varotettava muita laivoja.

*****

Marconihytin sähkölennätinlaitos ratisi. Kipinät lentelivät


avaruudessa ja saapuivat päämääräänsä. Suuri laiva, oikea
merijättiläinen halkasi Atlannin aaltoja, ollen ensi matkallaan uutta
mannerta kohti. Sähköttäjä otti vastaan sanoman ja kirjotti sen
luettavaan muotoon. Sitten pani hän takin ylleen ja lakin päähänsä
sekä riensi komentosillalle.

— Missä on kapteeni, kysyi hän.

— Merenkulkuhytissä, vastattiin. Sähköttäjä naputti ovelle ja astui


sisään.

— Sähkösanoma, herra, sanoi hän.

— Mistä? Mitä siinä sanotaan, kysyi kapteeni, ojentaen kätensä


ottaakseen vastaan paperin.
— "La Touraine" -laivalta ilmoitetaan, että edessämme on jäitä.
Meri on täynnä jäävuoria aina 40 asteelle pohjoista leveyttä.
Jääkentät ovat tavattoman laajoja. Ne ovat juuri meidän
kulkuväylällämme.

Kapteeni silmäsi pian sähkösanoman. Hänen otsansa synkkeni, ja


hän varjosti kädellään silmiään. Näytti siltä, että hän koetti keskittää
ajatuksensa.

— Jäät ovat aikaisin liikkeellä tänä vuonna. On ikävää, että


kohtaamme niitä juuri tällä matkalla, sanoi kapteeni.

Hän meni puhumaan miehilleen asiasta.

— Jäätietoja "La Tourainelta", sanoi hän. — Jääjoukkoja on


kulkuväylällämme.

— Muutetaanko suuntaa, kysyi vanhempi perämies.

— Pitäkää se entisellään, vastasi kapteeni lyhyesti. Samalla loi hän


katseen alas kannellaolijoihin, aivan kuin olisi tahtonut etsiä jotakin
heidän joukostaan. Kun hän palasi merenkulkuhyttiin, olivat hänen
tavallisesti niin turvallisen näköiset silmänsä levottomat.

Perämiehet neuvottelivat komentosillalla.

— Onko New Foundlandin lähistöllä jäätä, kysyi eräs heistä. —


Olisiko edullisempaa mennä niin kauas etelään kuin mahdollista?

— Kyllä minäkin arvelen niin, sanoi toveri. — Mutta "äijä" jatkaa


kyllä tätä suuntaa. Johtaja on laivassa.

— Mutta ei hän tiedä, mitä reittiä me kulemme.


— Kyllä vaan. Hän tietää sen. Kapteeni Smith on hyvin tukalassa
asemassa. Toiselta puolelta vaatii johtaja ennätystä — sitä mies
tarkottaa sanoessaan tahtovansa nähdä, "miten se työskentelee" —
toiselta puolelta on hänen otettava huomioon laivan ja matkustajien
turvallisuus. Mutta meillä on se lohdutus, ettei laiva voi upota, vaikka
törmäisikin jäävuoreen. "Titanic ei voi upota", on tullut
puheenparreksi.

— En minä kumminkaan haluaisi vaihtaa paikkaa kapteenin


kanssa, sanoi ensimäinen perämies. — Minun hartiani eivät voisi
kantaa niin raskasta edesvastuun taakkaa.

Muutaman tunnin kuluttua tuli uusi sähkösanoma. Kapteeni käski


sähköttäjän tunnustamaan sen vastaanoton ja kiittää siitä. Hän otti
sen mukaansa komentosillalle mennessään.

— Uusi ilmotus jäistä, sanoi hän miehille, — tällä kerralla


"Tunesianista". — Sieltä on nähty enemmän kuin 200 jäävuorta.

— Muutetaanko suunta, kysyi se perämies, joka ennenkin oli


tehnyt saman kysymyksen.

— Ei, vastasi kapteeni yhtä lyhyesti kuin edelliselläkin kerralla. —


Emme muuta sitä.

Mutta kapteeni Smith oli raskasten huolien painostamana. 30-


vuotisesta kokemuksestaan merellä tiesi hän paremmin kuin kukaan
muu, mitä sähkösanomissa mainitut jäät merkitsisivät. 1892-
vuodesta alkaen oli hän ollut Valkean Tähden linjan "Majestic"-laivan
kapteenina, sen ensi matkasta alkaen. Sitten oli hän siirtynyt saman
linjan yhä isompien laivojen päälliköksi. Koko hänen kapteenina-
oloaikanaan ei ollut tapahtunut ainoatakaan onnettomuutta. Hän oli
ollut varovainen eikä antautunut mihinkään uhmailuihin. Mutta nyt
nämä jäävuoret! Niitten tarkkaa asemaa oli mahdoton määrätä. Olisi
viisaasti tehty, jos niitä välttäisi. Mutta jos olikin viisas, tiesi myös,
mitä yhtiö odotti. Yhtiö! Kunpa matka jo olisi tehty! Sittenpä sopisi
vetäytyä maalle nauttimaan arvokkaan lepoa — — —

Kapteeni näki johtaja Ismayn tulevan tupakkasalongista raitista


ilmaa nauttimaan. Hän meni kävelykannelle tätä tapaamaan.

— Sähkösanoma, sanoi hän, toivoen saavansa sanan


toimintaohjeeksi. — Tässä on "Tunesianista" lähetetty sähkösanoma,
joka lienee teistä mielenkiintoinen. Olkaa hyvä!

Mutta Bruce Ismay ei vastannut sanaakaan. Hän luki hätäisesti


sähkösanoman, pisti sen taskuunsa ja jatkoi kävelyään aivan kuin ei
mitään olisi tapahtunut…

Vuodenaikaan nähden oli tavattoman kylmä, ja "Titanicin" kannella


oli siis hyvin vähän väkeä. Joukko herroja keskusteli
tupakkasalongissa. Muutamat huomauttivat tavattoman kylmästä
ilmasta.

— Atlanti on aina kylmä tähän vuodenaikaan, sanoi Niilo Vieremä.

— Ei sentään aina, väitti joku. — Mutta talvi on ollut harvinaisen


kylmä. Väitetään, että pohjoisempana liikehtii joukko jäävuoria. —
Jos meillä on onni puolellamme, saanemme nähdä niitä lähemmältä
ennenkuin tulemme perille…

— Onniko, huudahti eräs vanhempi herra, joka ennen oli ollut


kapteenina Englannin laivastossa. — Kiitän sellaisesta onnesta!
Jäävuoret ovat pahimpia vastuksia, joitten kanssa voi tulla
tekemisiin. Miltä tahansa vaaralta voi suojella itseään, mutta ei
jäävuorilta. Ne ovat merenkulkijain pahimpia vihollisia.

— Kohtalon työkaluja, lisäsi Mc Dean.

— Eräs kohtalon monista työkaluista, oikasi edellinen puhuja.


Vedenalaiset karit tuhoavat enimmin laivoja ja ihmishenkiä. Mutta
me tiedämme, missä niitä on ja voimme määrätä laivojen reitit.
Meillä on majakoita ja merkkejä, jotka varottavat vedenalaisilta
kareilta. Mutta kaikesta huolimatta ei karilleajoja voida välttää.
Rannikkovesien pohjassa on kaikkialla haaksirikkoisten laivojen
jätteitä, ja rannikkojen valkeassa hiekassa lepää tuhansittain
hukkuneita merimiehiä, jotka ovat nähneet päivänvalon jossakin
toisessa maanosassa.

— Ja sitten on sumu kiusana, sanoi Vieremä.

— Niin. Se on myös kohtalon työkalu. Me voimme välttää moniaita


muita vaaroja, mutta kun sumu laskeutuu eteen ja tukkii näköpiirin,
emme voi mitään. Te, herrat, jotka kulutatte aikanne
tupakkasalongissa ja olette pahoillanne höyrypillin kimakoista
vihellyksistä, ette aavista, mitä laivan päällikkö tuntee komentosillalla
seisoessaan, kun sumu peittää näköpiirin. Siinä hän seisoo silmät
auki kumminkaan näkemättä mitään. Voinette arvata, kuinka
jännitettyinä hänen hermonsa ovat, kun hän katselee
läpinäkymätöntä sumua laivasta, jonka kumminkin täytyy päästä
eteenpäin.

— Mutta laki määrää hiljaisen vauhdin sumussa.

— Laki on vaiti niin kauan kun kaikki käy hyvin. Missä ei ole
syyttäjää, siellä ei ole tuomariakaan. Jos jotakin tapahtuu, pannaan
tutkimus toimeen. Mutta luonnollisesti on silloin jo myöhäistä.
Merellä on aikojen kuluessa tapahtunut niin monta onnettomuutta,
joitten syitä ei koskaan ole tutkittu. Parhailla toiveilla on monta laivaa
lähtenyt satamasta, mutta eivät ne koskaan ole päässeet
määräpaikkaansa. Ei ole koskaan saatu tietää, mihin ne ovat
joutuneet. Jokin kohtalon väline on ne tuhonnut. Esimerkiksi ovat ne
voineet törmätä ympärillä ajelehtiviin laivanhylkyihin tai jäävuoriin.
Tuntemattomiin syvyyksiin ovat ne vaipuneet ihmisineen päivineen.
Eikä ole jäänyt jälelle ketään, joka olisi tietänyt tapauksesta kertoa.

— Tämä keskusteluaine on kammottava, mutta kieltämättä


mielenkiintoinen, sanoi Mc Dean.

— Jos herroilla on halua kuunnella, voin minä kertoa koko joukon


merionnettomuuksien historiaa. Muutamia vuosia sitten makasin
sairaana Englannissa. Saadakseni ajan kulumaan kirjotin erään
teoksen meriliikekirjastoa varten. Sen nimi on
"Jäävuorionnettomuuksia" ja se sisältää koko joukon jännittäviä
asioita. Jos siis haluatte kuunnella…

— Kertokaa, huusivat herrat yhdestä suusta.

— Vaarat olivat niin suuria, ja niitä oli niin monta, alkoi kapteeni.
— Vuosien kuluessa olivat jäävuoret tehneet sellaista tuhoa, että
moni linja luopui entisestä reitistään ja valitsi eteläisemmän. Mutta
tämä seikka ei poistanut onnettomuuksia; se vaan rajotti niitten
lukua. Syyskuussa 1899 törmäsi höyrylaiva "City of Rome"
matkallaan Glasgowista Newyorkiin jäävuoreen keskellä eteläistä
reittiä. Laiva kulki ainoastaan puolella höyryllä ja sillä oli sumun
tähden kaksinkertainen vartiasto. Laivassa oli 1,600 ihmistä. Näistä
oli 500 salonkimatkustajia.
Nämä istuivat pöydässä yhteentörmäyksen tapahtuessa. Syöjät ja
ruoat lensivät lattialle. Niin pian kun kauhun valtaamat ihmiset olivat
päässeet jaloilleen, riensivät he kannelle. Onneksi oli kuri hyvä, ja
muutaman minuutin kuluttua oli pakokauhu ohi, erittäinkin kun
kapteeni vakuutti, ettei mitään välitöntä vaaraa ollut tarjona. Laiva
oli halassut pitkän ja leveän jäävuoren ja saanut useamman vuodon.
Mutta vedenpitävien kammioitten varassa pysyi laiva pinnalla ja
pääsi muita vaaroja kohtaamatta satamaan.

Kaksikymmentä vuotta sitä ennen tapahtui merkillisin jäävuoreen


törmäys, mitä koskaan olen kuullut kerrottavan. Vuonna 1879
törmäsi höyrylaiva Arizona, joka "Great Easternin" jälkeen oli sen
ajan suurin laiva, jättiläisjäävuoreen 250 englannin peninkulman
päässä S:t Johnista. "Arizona" kulki 18 solmuvälin nopeudella, ja
törmäys oli kauhea. Se tapahtui yöllä, ja matkustajat nukkuivat. He
syöksyivät vuoteistaan ja juoksivat kannelle yövaatteissaan. Syntyi
kauhea pakokauhu, jossa joukko ihmisiä sai pahoja vammoja,
puhumattakaan niistä, jotka itse törmäyksessä loukkaantuivat.
Ihmiset koettivat rynnäköllä anastaa pelastusveneet, mutta
miehistön onnistui tyynnyttää kauhun valtaamat matkustajat. Pian
levisi se ilahuttava tieto, että laiva pysyi pinnalla vedenpitävien
kammioitten avulla. Matkustajat tyyntyivät vähitellen. Nyt saattoivat
päällystö ja miehistö ryhtyä työhön laivan irrottamiseksi jäistä.

Irrotustyö onnistui, ja laiva pääsi takaperin kulkemalla sulaan


veteen. Kun Arizona 36 tuntia hiljaisella vauhdilla kulettuaan pääsi
S:t Johniin, olivat kaupungin kaikki asukkaat laivalaiturilla ihmettä
katsomassa.

— Mitä ihmettä, huudahti satamakapteeni, joka ensimäisenä astui


laivaan. — Olen kuullut, että Glasgowista on joskus tuotu tänne
kivihiiliä, mutta enpä vielä koskaan ole kuullut puhuttavan sellaisesta
houkkiosta, joka toisi jäitä meidän seuduillemme. Laivan keulassa
oleviin ammottaviin reikiin oli näet tarttunut suuria jäänkappaleita.

— Tehkää te vaan pilaa, sanoi laivan kapteeni. — Mutta me


olemme hyvillämme, ettei meidän tarvinnut jääkaapissa mennä
merenpohjaan.

Tuntuu todella merkilliseltä, että laiva voi selviytyä tuosta


onnettomuudesta edes viottuneena. Mutta "Arizona" olikin
tavattoman luja laiva. Muussa tapauksessa se epäilemättä olisi
joutunut tuhon omaksi.

Tähän asti kertomissani tapauksissa ovat jäävuoriin törmänneet


laivat pelastuneet perikadosta, jatkoi kertoja, — — mutta jokaista
onnellista tapausta kohti on vähintäin tusina sellaisia tapauksia, jotka
ovat päättyneet onnettomasti. Maaliskuussa 1841 hävisi "President"-
niminen höyrylaiva, mukanaan 120 henkilöä, matkalla Newyorkista
Liverpooliin. Samassa kuussa 1854 lähti höyrylaiva "City of Glasgow"
mukanaan 400 henkeä, matkalla Filadelfiaan. Se ei koskaan tullut
perille. 1856 hävisi Valkean Tähden linjan "Pacific"-laiva, vieden
mukanaan 185 henkeä. "City of Boston", joka 1870 lähti Bostonista,
mukanaan 191 miestä, joutui saman kohtalon alaiseksi.

Mutta pitkä onnettomuusluettelo ei vielä ole lopussa. Helmikuussa


1892 hävisi toinen Valkean Tähden linjan laiva nimeltä "Noronic"
matkalla Liverpoolista Newyorkiin. Samassa kuussa hävisi "State of
Georgia" Aberdeenin ja Bostonin välillä. Helmikuussa 1899 oli
"Alleghanyn" vuoro hukkua Newyorkin ja Doverin välillä. Samassa
kuussa 1902 hukkui "Huronian" Liverpoolin ja S:t Johnin välillä.
Yhtään näistä onnettomuuksista ei ole koskaan saatu selvitetyksi. Ne
kuuluvat meren suurimpiin arvoituksiin. Minun tietoni ulottuvat
ainoastaan 1905 vuoteen asti, mutta senjälkeen on useita
samallaisia onnettomuuksia edelleenkin tapahtunut.

Kun nämä jäljettömiin häviämiset ovat tapahtuneet helmikuusta


toukokuuhun, voidaan jokseenkin varmasti päättää, että jäävuoret
ovat olleet tuhontuottajina. Luultavasti ovat yhteentörmäykset olleet
niin voimakkaita, että laivat ovat menneet pohjaan ennenkuin
pelastusveneitä on ehditty laskea vesille. Ja ne matkustajat, jotka
ovat pysytelleet laivankappaleilla, ovat pian paleltuneet kuoliaaksi.

Mutta on myös tapahtunut, että jäävuoreen törmänneen ja


uponneen laivan miehistö on pelastunut ja jäänyt elämään.
Ihmeellinen oli todella "Polariksesta" eloonjääneitten pelastus. Tämä
oli valaanpyydystyslaiva, jonka jäät murskasivat Grönlannin
rannikolla lokakuussa 1879. Miehistö kulki jäänkappaleella Golfin
virtaa eteläänpäin, ja sen pelasti purjelaiva "Tigress" New
Foundlandin edustalla puoli vuotta myöhemmin. Maaliskuussa 1893
pelasti parkkilaiva "Diana" edellisenä yönä uponneen höyrylaiva
"Castlegaten" eloonjääneet matkustajat. Toukokuussa 1897 pelasti
purjelaiva "Labrador" jäävuoreen törmänneen "Windsor Laken"
eloonjääneen miehistön.

Kolme vuotta myöhemmin törmäsi höyrylaiva "Ireland" jäävuoreen


saaden suuren vuodon, ja heinäkuussa 1896 joutui
kuormahöyrylaiva "Concordia" Bellisle-salmessa samallaisen kohtalon
alaiseksi. Sen keulassa oleva reikä oli niin suuri, että kuormavaunu
olisi mahtunut siitä sisään. Olipa melkein ihme, että laiva pysyi
uivana niin kauan, että pääsi S:t Johnin satamaan.

Yhtä merkillinen oli nelimastoisen laivan "Knight Bachelonin"


seikkailu kesäkuussa 1897. Matkalla Newyorkiin sai se vielä
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like