Is it possible to infer the genetically determined value of a quantitative trait from other traits? To answer the question we need to know how traits are coded in phenotype space (P) which can be partitioned into a subspace determined by genetic factors (PG) and a subspace affected by non-genetic factors (PNG). Evolutionary theory predicts PG is composed of limited dimensions while PNG may have infinite dimensions, which suggests a novel dimension decomposition method to separate them. After validating the method using simulation we applied it to a yeast phenotype space comprising 405 traits. The obtained yeast PG matches the actual genetic components of the yeast traits, explains the broad-sense heritability, and facilitates the mapping of quantitative trait loci, highlighting the success of the subspace separation. A limited number of latent dimensions in the PG were found to be recurrently used for coding the diverse yeast traits, while dimensions in the PNG tend to be trait specific and increase constantly with trait sampling. Similar results were obtained by analyzing the UK Biobank human brain phenome, which elucidated the genetic versus non-genetic origins of the left-right asymmetry of brain. In sum, phenotypic traits are coded by a rather small set of genetically determined basic dimensions and numerous trait-specific dimensions that are shaped by non-genetic factors, a rule enabling the identification of genetic components of quantitative traits based solely on phenotype.