How to create a set (of matrices) which will be used as an finite group to minimize a function?

I’m new here so I’m a little lost.

I need to minimize a function considering that the minimizing parameter belongs to a preestablished set. It all involves matrices.It’s something like this:

enter image description here

Where G is the set I need to create and enter image description here represents an element of the set. All the other parameters are given.