I am in pre-calculus and when I solve for the distance from the point to a line using pure algebra my teacher said it the solution was neater with matrices but I don't really know anything about matrices other than finding 2x2 determinants. Is it possible to figure it out with just algebra, and if so can I get steps?

I am in pre-calculus and when I solve for the distance from the point to a line using pure algebra my teacher said it the solution was neater with matrices but I don't really know anything about matrices other than finding 2x2 determinants. Is it possible to figure it out with just algebra, and if so can I get steps?