Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 0: Computing Foundations

Linear algebra describes objects such as vectors and matrices and the operations we perform on them. Python lets us carry out those operations, test conjectures, and work with examples too large to compute by hand.

This chapter is a pre-course bootcamp. It does not assume prior programming experience, and it introduces only the Python needed for the rest of this book.

Learning objectives

By the end of this chapter, you will be able to:

  1. work in a Jupyter notebook and restart a notebook safely;

  2. use Python variables, expressions, functions, conditionals, and loops;

  3. create NumPy arrays and inspect their shape and data type;

  4. select and reshape array data with indexing, slicing, and masks;

  5. explain and use vectorized operations and broadcasting;

  6. distinguish elementwise multiplication from matrix multiplication;

  7. use numpy.linalg.solve to solve a square linear system;

  8. explain why explicitly computing an inverse is usually not the best way to solve a system; and

  9. create labeled plots of scalar and vector data with Matplotlib.

Chapter map

SectionMain ideasSuggested time
0.1 Getting startedJupyter workflow, kernels, Markdown, imports30–45 min
0.2 Python basicsValues, functions, control flow60–75 min
0.3 NumPy arraysShapes, indexing, slicing, broadcasting75–90 min
0.4 Linear algebra toolsMatrix multiplication, solve, inverse60–75 min
0.5 VisualizationLine, scatter, and vector plots45–60 min
Lab 0Integrated readiness practice90–120 min

Conventions used in this book