Osteoblasts function by producing a matrix composed mainly of type I collagen. They then deposit calcium and phosphate to form hydroxyapatite crystals, which mineralize the matrix and increase the strength and density of the bone. Osteoblasts eventually become embedded in the matrix they produce and differentiate into osteocytes, which help maintain the bone tissue.