how to checkmate with a queen


Ever notice that little symbol right under the a1 square? Try running your cursor over it; I'll wait.... Go To Analysis pops up, right? Try clicking on it and see if what you have posted actually shows the truth of the position...
Nope. Three inaccuracies. Moves 2, 3, and 5.
@onlyflowerymelody is presumably demonstrating a method by forcing the king to the edge using only the queen and then bringing up the king. This is generally sub-optimal but works and gives the same number of points as an accurate method.
Why 7.Qc7 though?
Btw the chess.com analysis is not correct for all positions (though it should manage KQK).

There are several ways of checking with a queen. I have learnt to drive the opposing king so it has one column/ line left. You then advance your king one move behind the opposing one and wait until it reaches the queen. Then it will be directly in front of your king, meaning it can only move sideways. Next move your queen down eliminating all escape squares and delivers checkmate.
Having directed a LOT of scholastic tournaments I've found that beginners will draw about half the time with K+Q vs their opponent's K and they will stalemate about 90% of the time with K+2Q vs K.
A simple, easy to remember, method is more effective for teaching them than a technically elegant method that is the fewest moves. Now if we were talking about puzzle solving then an entirely different mindset is involved.

There are several ways of checking with a queen. I have learnt to drive the opposing king so it has one column/ line left. You then advance your king one move behind the opposing one and wait until it reaches the queen. Then it will be directly in front of your king, meaning it can only move sideways. Next move your queen down eliminating all escape squares and delivers checkmate.
Pretty effective method which I use too, but just pointing out, you could have checkmated earlier with Qe7# on move 14, since you don't need to shift your queen to do a back rank. Not a big difference but could be important in some time struggles.

This is a slow method. Instead, you should first bring your king up. Then, cut off the enemy king on the last rank. Then, mate. I don't see the point of doing the L shape. It's just a waste of moves.
Quickest is usually to use the king and queen from opposite sides to push the enemy king to the nearest edge. E.g.
Look out for stalemates, e.g. don't play 6.Qc6 in the first example.
If you use @onlyflowerymelody's method, it's slower but you're unlikely to blunder into stalemate.
Be prepared to change your mind every move about at which edge you want to mate whatever method you use.
@Copernicus9
Thanks.
To add comments edit the pgn file in a text editor and insert the comments enclosed by curly brackets {like this}. Alternatively download the Tarrasch GUI (http://www.triplehappy.com/) and you can type the comments directly into the move record, then save as file. (The comments in my post #13 are remnants of comments automatically inserted by the Wilhelm chess program.)