Snagged a little on some vector math

I'm learning how to calculate E-fields and, in some examples, when using the unit vector r^ with only one component (ie r^x or r^y), it is simply defined r^x=x/r. I am missing the algebra. Will anyone explain this to me? Thanks