Closin or seaming knit hat

Hello Everyone,

I need help or input. I make a hat (straight needles). I need to now close up seam. How do you close the rib stitch (brim of hat) before going on to the stockinette stitch, which I plan to use the mattress stitch to close. Thanks for any help.

You have to knit the entire hat first, then sew up the edges.

Use mattress there as well. If you’re seaming were two purl rows meet, pick up the lower purl loop on one side and the upper purl loop on the other side and stitch.