If I take a rectangle of length $a$ and height $h$, then the first moment of area $A$ about the $x$-axis is
$$Q_x=\int y\,dA=\int_{-h/2}^{h/2}\int_{-a/2}^{a/2}y \, dx dy = 0$$
Similarly, I can also show that about the $y$-axis we have $Q_y=0$.
I have trouble showing $Q_z=0$. I am taking $$Q_z=\int\int r\, dx dy = \int \int \sqrt{x^2+y^2}\,dxdy.$$
I have no idea what the limits of integration should be. I was wondering if anyone can help me out with this. Thank you so much for your help.
From wikipedia
So you have a figure in a plane, not necessarily through the origin.
The statement in the title is true in a more general sense, for any number of dimensions. Let's suppose we have a 3D object, with a constant density $\rho$, spanning a region $V$ in space. The mass of the object is $$M=\rho\iiint_V dV=\rho\iiint_V dx dy dz$$ The coordinates of the center of mass are $$\begin{align}x_c&=\frac{\rho}M\iiint _Vxdxdydz\\y_c&=\frac{\rho}M\iiint _Vyxdxdydz\\z_c&=\frac{\rho}M\iiint _Vzdxdydz\end{align}$$
The moment with respect to a point $(x_0, y_0, z_0)$ is given by $$Q_x(x_0)=\iiint_V(x-x_0)dx dy dz$$ and similar for $y$ and $z$.
Now let's choose $x_0=x_c$. $$\begin{align}Q_x(x_c)&=\iiint_V(x-x_c)dx dy dz\\ &=\iiint_Vxdx dy dz-\iiint_Vx_cdx dy dz\\&=x_c\frac{M}{\rho}-x_c\iiint_Vdxdydz\\&=x_c\frac{M}{\rho}-x_c\frac{M}{\rho}\\&=0\end{align}$$
You can do similarly for $y$ and $z$ components.
This will apply to a planar figure in 3D as well. The density will contain a delta function, to limit it to a surface density. Then the integration volume can be transformed into a 2D integration area through a clever choice in change of variables, and you don't care about the direction perpendicular to the plane. What I mean by this, suppose that your cross section is in a plane parallel to the $xy$ plane, but located at $z=z_0$. Then the center of mass must be in the plane at $z_0$. Then the $z-z_0$ term for all the points is zero.
Let's assume that we have only a figure in the $xy$ plane, so we can ignore the $z$ direction. Say we have a rectangle, with axes parallel to the $x$ (from $x_0$ to $x_1$) and $y$ (from $y_0$ to $y_1$) axes. Then $$\begin{align}A&=\int_{x_0}^{x_1} dx\int_{y_0}^{y_1}dy=(x_1-x_0)(y_1-y_0)\\x_c&=\frac 1A\int_{x_0}^{x_1} xdx\int_{y_0}^{y_1}dy\\&=\frac 1{(x_1-x_0)(y_1-y_0)}\left(\frac{x_1^2}2-\frac{x_0^2}2\right)(y_1-y_0)\\&=\frac{x_1+x_0}2\\Q_x&=\int_{x_0}^{x_1}(x-x_c)dx\int_{y_0}^{y_1}dy\\&=\left(\frac{x_1^2}2-\frac{x_0^2}2\right)(y_1-y_0)-x_c(x_1-x_0)(y_1-y_0)\\&=0\end{align}$$ You can do similarly for $y_c$ and $Q_y$.