addition

Navigation:  Language Reference > Operators > Arithmetic >

addition

Previous pageReturn to chapter overviewNext page

Syntax

A + B

Description

A + B adds A and B. A and B must have the same size, unless one is a scalar. A scalar can be added to a matrix of any size.

Examples

A

B

A + B

1

3

4

2.1

-3.2

-1.1

[1,2;3,4]

[1,1;5,5]

[2,3;8,9]

2

[1,2;3,4]

[3,4;5,6]

[1,2;3,4]

4

[5,6;7,8]

[1,2;3,4]

[5,6;7,8;9,10]

not allowed!

Limitations

If A and B are matrices, they must have the same size.