def dimension(x):
    """
    Return the dimension of ``x``.

    EXAMPLES::

        sage: V = VectorSpace(QQ,3)
        sage: S = V.subspace([[1,2,0],[2,2,-1]])
        sage: dimension(S)
        2
    """
    return x.dimension()