Y = 0.2126 R + 0.7152 G + 0.0722 B
The (R,G,B) here is linear. To get it linear you need a gamma of approximately 2.2 (see the wikipedia page for the exact transform which is linear for low values).
If we go with a linear Y of 0.0722, these pure saturated colors are all the same luminance:
(0, 0, 1.0)
(0, 0.1, 0)
(0.34, 0, 0)
In 8bit RGB after gamma these would be equal Y RGB:
(77, 77, 77)
(0, 0, 255)
(0, 90, 0)
(156, 0, 0)
This is an image with those colors:
Note the blue and red probably look brighter to you even through they "should" be the same luminance. The green is about the same brightness as the grey for me on my computer. There are many places in calibration and cross-computer image viewing that would explain some of why these are not all the same subjective brightness. But a contributing effect is almost certainly the Helmholtz-Kohlrausch effect, where saturated colors appear brighter than neutral colors. It's good to be aware of this because it can make you think your math is wrong when in fact your perceptual system is just complicated!