Explicit formulas for the constituent matrices. Application to the matrix functions