# Does putting the metric tensor for flat spacetime between any two four vectors give an invariant quantity?

I saw that various quantities that were of the form: $$\textbf{a}\eta\textbf{b}$$, where $$\textbf{a}$$ and $$\textbf{b}$$ are some four vectors, are Lorentz invariant. For example, it seems that $$p_t^2-p_x^2-p_y^2-p_z^2$$ is lorentz invariant and so is $$ctp_t-xp_x-yp_y-zp_z$$. So can we extend this to the general case for any 2 four vectors $$\textbf{a,b}$$?

$$\eta_{\mu\nu}p^\mu p^\nu=p_\nu p^\nu \tag{1},$$ and the contraction of the four-position with the four-momentum:
$$\eta_{\mu\nu}x^\mu p^\nu=x_\nu p^\nu \tag{2}.$$