# MATLAB Level 2: Matrices & Arrays

> Level 2: Matrices & Arrays of the LoWisa MATLAB course: Matrix Operations, Indexing, Vectorised Computation. 3 lessons and 9 ideas, each explained in one line.

Matrices & Arrays is level 2 of 12 of the [LoWisa MATLAB course](/courses/matlab/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Matrix Operations

- **Building matrices.** Brackets build matrices: [1 2; 3 4]: semicolons ending **rows**.
- **Matrix versus element-wise.** The star multiplies **matrices**; dot-star multiplies element-wise: the distinction every bug report contains.
- **Concatenation.** Arrays **concatenate** in brackets: dimensions must agree, and size() is the referee.

## Indexing

- **Parentheses indexing.** Indexing uses parentheses: data(2, 3): one-based, row **comma** column.
- **Colon and end.** The **colon** slices: data(:, 1) a column, data(2:end, :) all but the first row.
- **Logical indexing.** **Logical** indexing filters by mask: data(data > 0): the question written as the answer.

## Vectorised Computation

- **Element-wise operators.** Dot operators work element-wise on arrays: each array transformed **whole**, no loop written.
- **Implicit expansion.** **Implicit** expansion broadcasts compatible shapes: a row plus a column making a grid.
- **sum, mean, along dims.** Reductions take a **dimension**: sum(data, 2) across rows: direction stated, not guessed.

## Before and after this level

- **Before:** [Level 1: MATLAB Foundations](/courses/matlab/level-1-matlab-foundations/): Variables and Types, Scripts, Control Flow.
- **Next:** [Level 3: Functions](/courses/matlab/level-3-functions/): Functions, Inputs and Outputs, Reusable Numerical Programs.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does MATLAB Level 2: Matrices & Arrays cover?

Matrix Operations, Indexing, Vectorised Computation: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 1: MATLAB Foundations, which covers Variables and Types, Scripts, Control Flow.

## Learn MATLAB on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/matlab/level-2-matrices-and-arrays/ · Updated 2026-11-30
