a=5

(*This is a comment.*)

{Pi,E,I,Infinity, GoldenRatio}

N[π]
N[π,10]

?Plot

Plot[Sin[x],{x,0,2π},PlotStyle->Blue]

(*Immediate assignment*)
x = 2;
y = (x^2);
y
x = 3;
y

x=.
y=.

(*Delayed assignment*)
x = 2;
y := (x^2);
y
x = 3;
y

(x^2)/.x->2

Mass=density*volume/.{density-> ρ,volume-> 4/3 π r^3}

Simplify[a((a^(-1))+2)]
a((a^(-1))+2)//Simplify

Simplify[a((a^(-1))+2)]
Simplify[(((E^x)+(E^(-x)))/2)]
FullSimplify[(((E^x)+(E^(-x)))/2)]

Solve[a x^2+b x+c==0,x]

Solve[a x+y==7&&b x-y==1,{x,y}]

Solve[(x^2+2) (x^2-2)==0,x,Reals]

DSolve[{x''[t]+4x[t]==0,x[0]==3,x'[0]==0},x[t],t]

xsol=NDSolve[{x''[t]+4x[t]==0,x[0]==3,x'[0]==0},x,{t,0,3}]

Plot[Evaluate[x[t]/.xsol],{t,0,3},PlotRange->All]

D[(x^2),x]
D[(x^2),{x,2}]
D[(x^2),{x,3}]

Integrate[(x^2),x]
Integrate[(x^2),{x,0,1}]
Integrate[(x^2)+(y^2),{x,0,1},{y,0,1}]

Sum[(n^2),{n,1,10}]

(∑_(n=1)^10)(n^2)

(∑_(n=1)^∞)(1/(n^2))

f[x_]:=x^2

f[x]
f[a+b]
f["text"]
D[f[x],x]
Integrate[f[a],{a,0,1}]

abs[x_]:=If[x<0,-x,x]
abs[-1]

For[i=0,i<4,i++,
Print[i]
]

n=1;
While[n<4,
Print[n];
n++
]

Table[(2^i),{i,0,10}]
Table[(x^i),{i,0,3}]
Table[i+j,{i,1,3},{j,1,3}]

Range[0,9,2]
Range[0.1,0.5,0.1]

avec={1,2,0}
Tmat={{1,2,3},{4,5,6},{7,8,9}}

avec//MatrixForm
Tmat//MatrixForm
avec//TraditionalForm
Tmat//TraditionalForm

ListPlot[Table[Sin[n],{n,0,2π,0.1}]]

RandomMat=Table[RandomReal[],{10},{10}];
MatrixPlot[RandomMat]

SymmetricMatrixQ[RandomMat]

A={a1,a2,a3};
B={b1,b2,b3};

A+B
A-B
A*B
A/B
A^B

A.B
A\[Cross]B

Length[A]
B//Length

mat1={{1,2,3},{4,5,6},{9,7,8}};
mat2={{1,3,2},{5,6,4},{0,7,8}};

mat1.mat2//MatrixForm

Dimensions[mat1]
Length[mat1]

Avec={1,a,4,7,b};
Avec[[2]]
Avec[[;;2]]
Avec[[2;;]]
Avec[[2;;4]]

Avec[[1]]=d;
Avec

RandomMat=Table[RandomReal[],{3},{3}];
RandomMat//MatrixForm
RandomMat[[1,2]]
RandomMat[[{1,2},{2,3}]]//MatrixForm

mat1//MatrixForm
Transpose[mat1]//MatrixForm

Tr[mat1]

vec1={1,0,3};
mat1.vec1