Simplified:
If you want to join images side by side:
[ AA.jpg ][ AB.jpg ][ AC.jpg ]
use:
convert +append AA.jpg AB.jpg AC.jpg row_A.png
NB: If they're not photos, you'll want the output to be PNG so it's not lossy.
When you want to join the rows the
+append
becomes -append
like so:
[ row_A.png ]
[ row_B.png ]
[ row_C.png ]
convert -append row_A.png row_B.png row_C.png all_rows.png