internalsGet Pro

Module 03 · Lesson 4 of 12Pro

Matrix multiplication in practice

Level
Beginner
Topic
Linear algebra for machine learning
Reading time
14 min

When you finish this page you can

  1. Predict the shape of a matrix product, or the error, from the two input shapes.
  2. Run a whole batch of feature rows through a weight matrix in one call, with the transpose in the right place.
  3. Tell @ from * and catch the mistakes that square shapes hide.
  4. Choose between one call, a Python loop and a loop over chunks for a large product.
  1. NumPy: arrays and vectorized maths14 min
  2. PyTorch tensors: shapes, axes and operations14 min
  3. Dot products: measuring how similar vectors are13 min
  4. Matrices as transformations of space13 min

One line, 200,000 customers, one error

is our example online store. Its ML team predicts which customers will stop buying, so Joseph’s growth team can send them a voucher. Farah, an ML engineer, builds that model on a notebook sample of 200,000 customers.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan