Coding the Matrix: Linear Algebra through Applications to Computer Science 8.4.2013 Edition
by
Philip N. Klein
(Author)
| Philip N. Klein (Author) Find all the books, read about the author, and more. See search results for this author |
ISBN-13: 978-0615880990
ISBN-10: 0615880991
Why is ISBN important? ISBN
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Use the Amazon App to scan ISBNs and compare prices.
Add to book club
Loading your book clubs
There was a problem loading your book clubs. Please try again.
Not in a club? Learn more
Join or create book clubs
Choose books together
Track your books
Bring your club to Amazon Book Clubs, start a new book club and invite your friends to join, or find a club that’s right for you for free.
In Stock.
Ships from and sold by Amazon.com.
More Buying Choices
An engaging introduction to vectors and matrices and the algorithms that operate on them, intended for the student who knows how to program. Mathematical concepts and computational problems are motivated by applications in computer science. The reader learns by doing, writing programs to implement the mathematical concepts and using them to carry out tasks and explore the applications. Examples include: error-correcting codes, transformations in graphics, face detection, encryption and secret-sharing, integer factoring, removing perspective from an image, PageRank (Google's ranking algorithm), and cancer detection from cell features. A companion web site, codingthematrix.com provides data and support code. Most of the assignments can be auto-graded online. Over two hundred illustrations, including a selection of relevant xkcd comics.
Chapters: The Function, The Field, The Vector, The Vector Space, The Matrix, The Basis, Dimension, Gaussian Elimination, The Inner Product, Special Bases, The Singular Value Decomposition, The Eigenvector, The Linear Program
Chapters: The Function, The Field, The Vector, The Vector Space, The Matrix, The Basis, Dimension, Gaussian Elimination, The Inner Product, Special Bases, The Singular Value Decomposition, The Eigenvector, The Linear Program
Frequently bought together

- +
- +
Total price:
To see our price, add these items to your cart.
Some of these items ship sooner than the others.
Choose items to buy together.
Customers who viewed this item also viewed
Page 1 of 1 Start overPage 1 of 1
Editorial Reviews
About the Author
Philip Klein is Professor of Computer Science at Brown University. He was a recipient of the National Science Foundation's Presidential Young Investigator Award, and has received multiple research grants from the National Science Foundation. He has been made an ACM Fellow in recognition of his contributions to research on graph algorithms. He is a recipient of Brown University's Award for Excellence in Teaching in the Sciences. Klein received a B.A. in Applied Mathematics from Harvard and a Ph.D. in Computer Science from MIT. He has been a Visiting Scientist at Princeton's Computer Science Department, at MIT's Mathematics Department, and at MIT's Computer Science and Artificial Intelligence Laboratory (CSAIL), where he is currently a Research Affiliate. Klein has worked at industry research labs, including Xerox PARC and AT&T Labs, and he has been Chief Scientist at three start-ups. Klein was born and raised in Berkeley, California. He started learning programming in 1974, and started attending meetings of the Homebrew Computer Club a couple of years later. His love for computer science has never abated, but in a chance encounter with E. W. Dijkstra in 1979, he was told that, if he wanted to do computer science, he had better learn some math. His favorite xkcd is 612.
Start reading Coding the Matrix instantly on your Kindle Fire or on the free Kindle apps for iPad, Android tablet, PC or Mac. Don't have a free Kindle app? Get yours here
Product details
- Publisher : Newtonian Press; 8.4.2013 edition (September 3, 2013)
- Language : English
- Paperback : 548 pages
- ISBN-10 : 0615880991
- ISBN-13 : 978-0615880990
- Item Weight : 2.77 pounds
- Dimensions : 8.5 x 1.24 x 11 inches
- Best Sellers Rank: #103,508 in Books (See Top 100 in Books)
- #6 in Mathematical Matrices
- #13 in Computer Networks
- #27 in Linear Algebra (Books)
- Customer Reviews:
About the author
Follow authors to get new release updates, plus improved recommendations.

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
4.4 out of 5 stars
4.4 out of 5
144 global ratings
How customer reviews and ratings work
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on Amazon
3.0 out of 5 stars
Nice concept, well written, flawed on Kindle
Reviewed in the United States on November 30, 2020
I'm a Python developer so appreciate this approach to linear algebra due to it's being explained in terms of Python. Also like the informality. However, at least on recent versions of Kindle app on Mac OS and iOS, seeing an occasional omission of figures, as seen in the screen shot I uploaded along with this review. This detracts from an otherwise fine piece of work by the author.
Reviewed in the United States on November 30, 2020
Images in this review
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
Reviewed in the United States on May 10, 2015
I am am a retired software engineer who spent my entire career working for an aero-space research company. I have a master's degree in mathematics including graduate level linear algebra. And yet, it took me years on the job to relate the books to the problems we were solving. Professor Klein does much of it with this book. For me, it is the perfect mix of abstract mathematics with real physical problems. I deeply regret not having it back then.
79 people found this helpful
Report abuse
Reviewed in the United States on August 12, 2015
This book is takes a fairly unique approach to introducing linear algebra. Unlike a lot of linear algebra texts, it provides a large number of examples and applications using real world scenarios (error correcting codes, encryption, etc.) It is well written, with some humorous touches here and there. It uses Python to implement the algorithms, but these sections can easily be skipped if you just want to use the text as an intro to linear algebra.
Another plus is that the Kindle edition is a print facsimile, which means mathematical expressions are rendered properly and at a size that is easily readable. This is an aggravating problem with most Kindle books for technical subjects. The only downside is that there is no index.
There are a few curious errors: in one diagram the numeral 1 is consistently replaced by an exclamation point (!). In another diagram, the Greek letter theta is replaced in several spots by, again, an exclamation point. These issues do not, however, detract from the overall value of the book and I highly recommend it.
Another plus is that the Kindle edition is a print facsimile, which means mathematical expressions are rendered properly and at a size that is easily readable. This is an aggravating problem with most Kindle books for technical subjects. The only downside is that there is no index.
There are a few curious errors: in one diagram the numeral 1 is consistently replaced by an exclamation point (!). In another diagram, the Greek letter theta is replaced in several spots by, again, an exclamation point. These issues do not, however, detract from the overall value of the book and I highly recommend it.
15 people found this helpful
Report abuse
Reviewed in the United States on October 9, 2015
I rarely write book reviews but I am compelled to write one for Coding the Matrix. This book first caught my attention when a course by the same name was offered at Coursera. I did not enroll in the course but instead bought the book for self study at some stage. This year, I spent 5 months working through the problems in the book (I am down to the last 2 of the 14 chapters) and I just want to say that I really wish there was a book like this in bookstores 20 years ago. What a fantastic way to teach Linear Algebra!! Previously, I had tried working through Gilbert Strang's book and video lectures on Linear Algebra but the material never stuck in my head. This book is quite different in its approach because it spends a lot of time providing the intuition behind fundamental concepts. What is the intuition behind a Matrix? What is the "meaning" of Matrix multiplication? What really is a Vector Space? What is the relationship between a Matrix and a Function? The author goes about explaining these basic concepts using a combination of worked exercises and hands on Python implementations. After working through this book I am convinced that implementing Linear Algebra algorithms and applying them to real world problems is the most effective way to learn the subject.
The hard copy book has several typos and errors but the Kindle version has been updated to fix most of these. Still, before you start, I suggest downloading the errata from the book's website just to be sure. The book has a short intro on Python which I thought was quite sufficient to tackle the programming exercises. This book requires real hard work if you want to get through it. Many times (especially in the Orthogonalization and Special Bases chapters) I found the going tough. But don't be discouraged - it is worth the effort. Now I really understand what QR factorization is about. SVD? No worries. The chapter on SVD starts with the absolute basics to explain how to derive the SVD formula and what the various component matrices really mean. I don't think I will ever see a A * A' multiplication in any other book without recollecting the beautiful explanation of orthonormal vectors from this book. The sad part for me is that I had to use all these concepts in the past working as a quant analyst at a bank, not knowing what these concepts really meant. So yeah, I wish it was published ages ago.
Thank you Prof Klein for writing this book. The teaching technique you have employed for such a complicated topic is unique and effective. Looking forward to the next edition.
The hard copy book has several typos and errors but the Kindle version has been updated to fix most of these. Still, before you start, I suggest downloading the errata from the book's website just to be sure. The book has a short intro on Python which I thought was quite sufficient to tackle the programming exercises. This book requires real hard work if you want to get through it. Many times (especially in the Orthogonalization and Special Bases chapters) I found the going tough. But don't be discouraged - it is worth the effort. Now I really understand what QR factorization is about. SVD? No worries. The chapter on SVD starts with the absolute basics to explain how to derive the SVD formula and what the various component matrices really mean. I don't think I will ever see a A * A' multiplication in any other book without recollecting the beautiful explanation of orthonormal vectors from this book. The sad part for me is that I had to use all these concepts in the past working as a quant analyst at a bank, not knowing what these concepts really meant. So yeah, I wish it was published ages ago.
Thank you Prof Klein for writing this book. The teaching technique you have employed for such a complicated topic is unique and effective. Looking forward to the next edition.
53 people found this helpful
Report abuse
Reviewed in the United States on February 14, 2021
I've made some progress with this book, but I find it to be a bit unergonomic to use. You need to jump back in the book fairly often to find material that gets referenced later. The author also starts a problem and leaves a lot dangling to (maybe?) be addressed later in the book. This may be fine for some readers, but it is not a style I enjoy. For my purposes, I switched to a Mathematics for Machine Learning Coursera course and have rapidly made more progress.
Reviewed in the United States on November 30, 2020
I'm a Python developer so appreciate this approach to linear algebra due to it's being explained in terms of Python. Also like the informality. However, at least on recent versions of Kindle app on Mac OS and iOS, seeing an occasional omission of figures, as seen in the screen shot I uploaded along with this review. This detracts from an otherwise fine piece of work by the author.
3.0 out of 5 stars
Nice concept, well written, flawed on Kindle
Reviewed in the United States on November 30, 2020
I'm a Python developer so appreciate this approach to linear algebra due to it's being explained in terms of Python. Also like the informality. However, at least on recent versions of Kindle app on Mac OS and iOS, seeing an occasional omission of figures, as seen in the screen shot I uploaded along with this review. This detracts from an otherwise fine piece of work by the author.
Reviewed in the United States on November 30, 2020
Images in this review
Reviewed in the United States on April 28, 2014
I'm only partially through this text, so please bear that in mind. With its presentation of applications, many tangents of historical interest, and 'interactive code exercises I find this to be one of the better presentations on Linear Algebra and Computer Science.
It's been fun to compare Professor Klein's ideas along side Gilbert Strang's texts.
Also I must give a high five to Prof Klein and all parties for their effort to keep this book affordable! The book is well worth your time and money!
It's been fun to compare Professor Klein's ideas along side Gilbert Strang's texts.
Also I must give a high five to Prof Klein and all parties for their effort to keep this book affordable! The book is well worth your time and money!
17 people found this helpful
Report abuse
Top reviews from other countries
Alien Uncle
5.0 out of 5 stars
Excellent book but be warned...
Reviewed in the United Kingdom on September 27, 2019
I rarely write book reviews but felt compelled to in this case. The reason is that although this book is very good indeed, a recommendation needs to come with a couple of caveats:
First, although I'm loath to participate in the death of more trees, you probably should buy a physical copy, not the Kindle edition. The author's technique is to start with a problem and an outline of a solution, then build on the solution as the reader advances through various topics. The result is a lot of cross-references, for which the author does provide links. I bought the Kindle edition and used bookmarks as I went along, but this quickly became irksome. I needed to be able to easily flick back and forth, append post-its, pencil notes in the margin, so I had my employer buy me the hard copy.
Second, I am glad this is not the book I learned linear algebra from. I think most people (except those too impatient) will benefit more from a thorough grounding in the basics before reading this book. Go and learn about RREF, vector spaces, factorization and so on, by watching the Strang lectures or studying a book like Kuldeep Singh's. If you already know LA, then like me, this book might bring a smile to your face once or twice: as a problem/solution is developed you will find yourself recognising where the author is taking you, anticipating the bit of LA that, when you learned it, seemed to be an abstruse solution in search of an unlikely problem, but suddenly makes perfect sense.
Third, if you're already on a steep maths learning curve, you don't need the additional burden of learning python. I'm glad I already had that under my belt.
In short, the book is excellent but think twice before starting with this (especially with the Kindle edition) if your aim is self-study.
First, although I'm loath to participate in the death of more trees, you probably should buy a physical copy, not the Kindle edition. The author's technique is to start with a problem and an outline of a solution, then build on the solution as the reader advances through various topics. The result is a lot of cross-references, for which the author does provide links. I bought the Kindle edition and used bookmarks as I went along, but this quickly became irksome. I needed to be able to easily flick back and forth, append post-its, pencil notes in the margin, so I had my employer buy me the hard copy.
Second, I am glad this is not the book I learned linear algebra from. I think most people (except those too impatient) will benefit more from a thorough grounding in the basics before reading this book. Go and learn about RREF, vector spaces, factorization and so on, by watching the Strang lectures or studying a book like Kuldeep Singh's. If you already know LA, then like me, this book might bring a smile to your face once or twice: as a problem/solution is developed you will find yourself recognising where the author is taking you, anticipating the bit of LA that, when you learned it, seemed to be an abstruse solution in search of an unlikely problem, but suddenly makes perfect sense.
Third, if you're already on a steep maths learning curve, you don't need the additional burden of learning python. I'm glad I already had that under my belt.
In short, the book is excellent but think twice before starting with this (especially with the Kindle edition) if your aim is self-study.
One person found this helpful
Report abuse
Jeremy Ellman
5.0 out of 5 stars
Coding the Matrix (Coursera)
Reviewed in the United Kingdom on August 6, 2013
Coding the Matrix is the (none essential) text book to accompany the author's course of the same name at Brown University, and now available on Coursera. This introduces Linear Algebra to an audience with programming experience. In addition to Python code examples, the book also distinguishes itself through the use of example scenarios that are meaningful to computing students.
The material in the book is straightforwardly expressed and accessible. It slightly extends the Coursera lectures, and supporting slides, but a reader unfamiliar with these would not recognise that origin.
There are exercises in each chapter, which are from the online course. There are however no solutions. It is though substantially easier to follow the examples in printed form. For me, the book has one further advantage over the on-line material - It has an index! This is invaluable when you are trying to find something again that was only half understood from the lectures.
At 510 pages and US legal (almost A4) size, this is a substantial book and a useful addition to the course material. Full credit to Amazon for charging the same in the UK as the US.
The material in the book is straightforwardly expressed and accessible. It slightly extends the Coursera lectures, and supporting slides, but a reader unfamiliar with these would not recognise that origin.
There are exercises in each chapter, which are from the online course. There are however no solutions. It is though substantially easier to follow the examples in printed form. For me, the book has one further advantage over the on-line material - It has an index! This is invaluable when you are trying to find something again that was only half understood from the lectures.
At 510 pages and US legal (almost A4) size, this is a substantial book and a useful addition to the course material. Full credit to Amazon for charging the same in the UK as the US.
9 people found this helpful
Report abuse
Georgios Giannopoulos
4.0 out of 5 stars
Good book if you follow the coursera course.
Reviewed in the United Kingdom on August 29, 2013
After watching the coursera course and using the discussion forums for questions I find this book useful to have. Without having any knowledge of Python or some knowledge of Linear Algebra I think it is very difficult to follow this course. I believe it will be very difficult to self-study linear algebra through this book without following the coursera course (and the discussion forums).
It is very nice that this books combines real computer science applications and demonstrate how linear algebra is used to solve them. This is the most nice part of this book.
It is very nice that this books combines real computer science applications and demonstrate how linear algebra is used to solve them. This is the most nice part of this book.
8 people found this helpful
Report abuse
Mr. J. A. Smith
4.0 out of 5 stars
KINDLE VERSION DOESN'T WORK IN KINDLE CLOUD READER
Reviewed in the United Kingdom on December 17, 2015
This book is great and the teacher is great - but I have a problem I cannot read the kindle version in Kindle Cloud Reader, this is a huge disappointment as I need to be able to read the book on various devices including my PC at work.
One person found this helpful
Report abuse
Mark Smith
3.0 out of 5 stars
Interesting and fun approach. However
Reviewed in the United Kingdom on September 1, 2014
Interesting and fun approach. However, the writing is often unclear and bars understanding - which is a shame. I am not following the coursera course, which may facilitate this understanding. The book is by no means unreadable, but is more work than it should be.
One person found this helpful
Report abuse










