The active subspace is defined by a set of directions in a multivariate function's input space. Perturbing the inputs along these directions changes the function's output more, on average, than perturbing the inputs in orthogonal directions. The active subspace is derived from the function's gradient, so it is a property of the function. We have presented and analyzed a technique based on randomly sampling the gradient to test whether a function admits an active subspace. When an active subspace is present, one can exploit it to reduce the dimension for computational studies that seek to characterize the relationship between the function's inputs and outputs, such as optimization, uncertainty quantification, and sensitivity analysis. This is especially useful for complex engineering simulations with more than a handful of inputs.