# multiply() Function & Examples

Use the multiply() operators function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## multiply

#### x * y

#### multiply(x, y)

Try it yourself:

```calculio
a = 2.1 * 3.4
a / 3.4
2 * 3 + 4
2 * (3 + 4)
3 * 2.1 km
```

[divide](https://calcul.io/function/divide/index.md)

---

## Multiply numbers, vectors, and matrices

**multiply** performs multiplication with behavior appropriate to its operands. For scalars it returns a product; for matrices it performs matrix multiplication when dimensions are compatible.

## Matrix meaning

A 2-by-3 matrix can multiply a 3-by-1 vector, producing a 2-by-1 result. Check dimensions with [size](https://calcul.io/function/size/index.md). Use [dotMultiply](https://calcul.io/function/dotMultiply/index.md) for elementwise multiplication and [dot](https://calcul.io/function/dot/index.md) for a vector dot product.

## Caveats

Matrix multiplication is not commutative: A×B usually differs from B×A. Use [identity](https://calcul.io/function/identity/index.md) for the multiplicative neutral matrix and [ctranspose](https://calcul.io/function/ctranspose/index.md) in complex linear algebra. Type and shape mismatches should be fixed explicitly, not hidden by flattening.

[All functions](https://calcul.io/functions/index.md)
