g2 for a vector