For covariant and contravariant second rank tensors we have:
$B_{jk} B^{jk}= B^{jk} B_{jk} = \text{invariant}$
For the second rank Ricci tensor we also have
$R_{jk} R^{jk}= R^{jk} R_{jk} = \text{invariant} \quad (1)$
The scalar curvature is defined as the trace of the Ricci curvature tensor with respect to the metric and is given by:
$R = g^{jk} R_{jk}$
Is the invariant obtained in $(1)$ the same as the scalar curvature $R$ or not?
Please explain or correct me if I'm wrong, I am in the process of learning tensor calculus.
The scalar curvature $R$ and (1), which is the square of the Ricci tensor $|R|^2$, are different quantities: you may see this in coordinates at a point where $R$ will be some matrix, and $g$ will be in general some other matrix, so there is no need for these things to be equal.
If you are not convinced, try to calculate these quantities on a standardly embedded sphere $\mathbb{S}^2 \subset \mathbb{R}^3$ with the induced metric and the intrinsic curvatures. You may find this answer helpful.