Algebra

Gradient of a scalar field

Needs["VectorAnalysis`"]

First plot the scalar field

Plot3D[{Sin[x] + Cos[y]},{x,-2Pi,2Pi},{y,-2Pi,2Pi}]

Plot the gradient vector field

Needs["VectorAnalysis`"]
f= Cos[Xx] - Sin[Yy]
{v1, v2, v3} =Grad[f]

{-Sin[Xx],Cos[Yy],0}
Plot3D[{-Sin[Xx] +Cos[Yy]},{Xx,-2Pi,2Pi},{Yy,-2Pi,2Pi}]

VectorPlot[{-Sin[Xx],Cos[Yy]},{Xx,-2Pi,2Pi},{Yy,-2Pi,2Pi}]

Divergence of a vector field

Needs["VectorAnalysis`"]

a= Div[{-Sin[Xx],Cos[Yy],0}] 
Plot3D[a,{Xx,-2Pi,2Pi},{Yy,-2Pi,2Pi}]

Needs["VectorAnalysis`"] 
vfield = {3Xx^2 +2Yy+(a  -3 b)  Zz, (b -7a)Xx -5Yy - Zz, 2Xx+c a Yy+7Zz}
Div[vfield]

IDENTITY: Divergence of the curl of a vector field  =0  ("Del of curl")

h = {3Xx^2 +2Yy+(a  -3 b)  Zz, (b -7a)Xx -5Yy - Zz, 2Xx+c a Yy+7Zz}
Curl[h]
Div[Curl[h]]

IDENTITY: Curl of the gradient of a scalar field =0  ("Curl of Del")

sfield=(Xx^2)+Yy (E^Zz)
Grad[sfield]
Curl[Grad[sfield]]

Algebra

Gradient of a Scalar Field

Needs["VectorAnalysis`"] 
f =Xx^2 + Cos[Yy]^2
{v1, v2, v3} = Grad[f]

Plot of the scalar field

Plot3D[{x^2 + Cos[y]^2},{x,-2,2},{y,-2,2}]

Plot the Gradient (vector) field

VectorPlot[{2 x,-2 Cos[y] Sin[y]},{x,-2,2},{y,-2,2}]

Divergence of a vector field

Needs["VectorAnalysis`"] 
vfield = {3Xx^2 +2Yy+(a  -3 b)  Zz, (b -7a)Xx -5Yy - Zz, 2Xx+c a Yy+7Zz}
Div[vfield]

IDENTITY: Divergence of the curl of a vector field  =0

h = {3Xx^2 +2Yy+(a  -3 b)  Zz, (b -7a)Xx -5Yy - Zz, 2Xx+c a Yy+7Zz}
Curl[h]
Div[Curl[h]]

IDENTITY: Curl of the gradient =0

sfield=(Xx^2)+Yy (E^Zz)
Grad[sfield]
Curl[Grad[sfield]]

Matrix multiplications

A = {{ a,b,c}}
B = {{e},{g}, {h}}
A  . B