Mathematica

To execute a command    :
                       Shift + Enter
                or
                       Insert

Numerical Calculation

1. Arithmetic

+,  -,   * ( space),  ^

2-7

2*3

2/3

2^3

2 3

Be careful!

2x

x2

?Random[Integer]

Bracket 
(   )      Grouping                                     (a+b)/(c+d)
 [  ]       Arguments of function              Sqrt[2]
{   }       Vectors,   Matrices,  Lists        {1, 3, 4}
 [ [   ] ]       Indexing                                m[[1,2]]
 (* .... *)     comments                          (* comments
                                                                  can be written here *)

2+3*2

2^2^3

2^(2^3)

(2^2)^2

Sqrt[4]

Log[Sqrt[4]]

{2,3}

{{1, -1},{2,3}}

m={{1, -1},{2,3}}

m[[1,2]]

(2+(3+2))/2

^, /, *, space, ( ), [ ], { },
%, %n
!  factorial
=, :=
==, 
!=
<,  <=, >=

Sin[0.1]

Sin[  0.1  ]

2/3

N[2/3]

2/3 //N

2./3

Sqrt[2]

Sqrt[2] //N

N[Sqrt[2]]

N[Sqrt[2], 10]

Sqrt[2.]

2. Mathematical Constants

Pi

Pi //N

E //N

I

Degree

Degree //N

Pi /180.

Golden

Degree =  Pi  /180.

3. Mathematical functions
Sqrt[x],  Exp[x],  Log[x],  Log[base,x],  
Sin[x],  Cos[x],  Tan[x],  ArcSin[x],  ArcCos[x],  ArcTan[x]
n!,   Abs[x],   Round[x],   Mod[n,m], 
Random[x]

a1=1.0

a=Sin[60. Degree]

a=Sin[30]

N[a]

a //N

b=1/2

c=0.5

Sqrt[b]

Sqrt[c]

Log[c]

Log[b]

Log[c]

Sin[c]

Cos[c]

Tan[c]

ArcSin[b]

ArcSin[c]

ArcCos[c]

ArcTan[c]

Pi

Pi //N

E //N

Degree //N

Pi/180.

Degree//N

I

a1=2+3 I

b1=1+2 I

a1+b1

Infinity

N[Pi,10]

N[Sqrt[2],10]

2^3

2.1^3

Log[E^10]

2^3

Sin[Pi/2]

Sin[90Degree]

56^(1/3)

56^(1/3)//N

%^3

%61^2

%65^3

%%%^(1/3)

x=10

x=10;

x+x

Clear[x]

x+x

x=10

x=.

x+x

x*a

?a

a=.

?a

?y

?@

?*Sin*

??ArcSin

Table[a,{3}]

}

Table[a^2+1,{a,4}]

Table[a,{a,2,6}]

Table[a,{a,1,3,.5}]

Range[10]

Range[1,3,.5]

x=Range[1,3,.5]

?x

Part[x,3]

x[[3]]

x=a+b

FullForm[x]