A finite characterization ofK-matrices in dimensions less than four