How are productivity, gross primary productivity,

How are productivity, gross primary productivity, net primary productivity and secondary productivity inter-related?

It is the amount of biomass or organic matter produced per unit area over a time period by plants during photosynthesis: It is expressed in terms of weight (g) or energy (kcal m).
The primary productivity has two aspects as discussed below:
Gross Primary Productivity (GPP)
It is the rate of production of organic matter during photosynthesis. A considerable amount of GPP is utilised by plants in respiration. .
Net Primary Productivity (NPP)
It is the available biomass for the consumption by heterotrophs (herbivores and decomposers). It is actually the amount of energy left in the producers after utilisation of some energy during respiration. Thus, Gross Primary Productivity minus the Respiration Losses gives the Net Primary Productivity.
GPP - R = NPP
where, R = Respiration losses.