Structured extension of matrices