A method for detection and prognosis of breast cancer and other types of cancer. The method comprises detecting expression, if any, for both an Id-1 and an Id-2 genes, or the ratio thereof, of gene products in samples of breast tissue obtained from a patient. When expressed, Id-1 gene is a prognostic indicator that breast cancer cells are invasive and metastatic, whereas Id-2 gene is a prognostic indicator that breast cancer cells are localized and noninvasive in the breast tissue.