Define simple function to create square matrices