Basic Arithmetic Calculation

Parent Previous Next

Basic Arithmetic Calculation


Here we discuss the 7 basic arithmetic operator:



  1. Addition and Subtraction


The addition operator "+" and subtraction operator "-" can be used for


Note that vector is considered as a special form of matrix.

Example:


Input

Output

1.5 + 9.6

1.7 + (-2.5+3i)

[1+i, 1-i] - [2, 4.2+0.7i]

[1,2.5; 3, 4i] + [2-5i,0;-i,1.7]



  1. Multiplication


The multiplication operator "*" can be used for



Example:


Input

Output

1.5 * 9.6

1.7 * (-2.5+3i)

[1+i, 1-i] * [2; 4.2+0.7i]

[1,2.5; 3, 4i; 0, -2i] * [2-5i,0, 5;-i,1.7, 3-i]


  1. Division


The division operator "/" can be used for



Example:


Input

Output

1.5 / 9.6

1.7 / (-2.5+3i)

[1+i, 1-i] / 2.0

[1,2.5; 3, 4i] / (1+i)


  1. Power


The division operator "^" can be used for



Example:


Input

Output

1.5 ^ 2.5

1.7 ^ (-2.5+3i)


  1. Modulus


The division operator "%" can be used for



Example:


Input

Output

1.6 % 0.5


  1. Negate


The negate operator "-" can be used for



Example:


Input

Output

- (2-3i)

- [1, -3; -i, 2]



Tips


Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator