Dimension theorem for vector spaces