Matrix Treatment of Waves in Mechanical Systems