# MATLAB (Matrix Laboratory)

URL: https://softwaredictionary.org/terms/matlab
Category: Programming Languages
Last updated: 2026-10-03
Pronunciation: MAT-lab

In short: MATLAB is a matrix-based language and environment from MathWorks for numerical computing, used by engineers and scientists for data analysis and simulation.

## What is MATLAB?

MATLAB started in the late 1970s as a teaching tool by Cleve Moler that gave students easy access to matrix libraries, and MathWorks was founded in 1984 to sell it. Its name, short for matrix laboratory, explains its design: almost everything is an array, and operations such as `A * B` or `A'` work on whole matrices at once.

Engineering is its home ground. Toolboxes add ready-made functions for signal and image processing, control systems, statistics, optimization, machine learning and more, and Simulink, its companion product, lets engineers model and simulate dynamic systems as block diagrams, from car braking systems to aircraft controls, and generate code for embedded hardware.

The MATLAB environment combines an editor, an interactive command window, plotting and live scripts that mix code, results and text. Code is vectorized by habit: instead of loops, you apply an operation to a whole vector, which is both shorter and faster.

A common misconception is that MATLAB is a general-purpose language like Python. It is proprietary and paid, with free access mainly through universities, and its strength is numerical engineering work. Many teams now use Python with NumPy and SciPy for similar tasks, and GNU Octave runs much MATLAB code for free. Note that arrays start at index 1.

## Key takeaways

- MATLAB is a language and environment for numerical, matrix-based computing.
- It began in the late 1970s; MathWorks has sold it since 1984.
- Toolboxes and Simulink serve engineering fields such as control and signal processing.
- Vectorized code operates on whole arrays instead of looping.
- It is proprietary; Python with NumPy and GNU Octave are common alternatives.

## Example: Solving equations and plotting with matrices

```matlab
% Solve the linear system A*x = b
A = [4 -2 1; 3 6 -4; 2 1 8];
b = [12; -25; 32];
x = A \ b               % backslash solves the system

% Vectorized: no loop needed
t = linspace(0, 2*pi, 200);
y = sin(t) .* exp(-t/3); % element-wise multiply with .*

plot(t, y, 'LineWidth', 2)
title('Damped sine wave')
xlabel('t'), ylabel('y')
```

## Frequently asked questions

**Is MATLAB free?**

No. MATLAB requires a license, though many universities provide it to students. GNU Octave is a free program that runs a large share of MATLAB code.

**MATLAB or Python?**

MATLAB offers polished engineering toolboxes, Simulink and a consistent environment. Python is free, general-purpose and has a huge ecosystem with NumPy, SciPy and pandas. Industry fields built around Simulink tend to keep MATLAB.

**What is Simulink?**

A MathWorks tool for modeling and simulating dynamic systems with block diagrams instead of code. It is widely used in automotive, aerospace and control engineering, and can generate code for embedded systems.

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
