Add matrices (#668)

Add matrices (#668)