matrix input format