How can I make 2 viewports in Blender python have the same orientation? I have this code:

def main(context):
    for area in context.screen.areas:
        if area.type == 'VIEW_3D':
            r3d = area.spaces.active.region_3d 
            view_matrix = r3d.view_matrix

How can I change the view_matrix so that it becomes something with my values? I did view_matrix[0][0] = some value etc... but it doesn't change values (and it doesn't give me errors).

So lets say I have 2 screens of 3D_VIEW with different orientations. How can I make them have the same orientation? (that's what i'm trying to do)
Changing the values works for me. The below script changes all 3D views to the first one (by internal order). This does not work in all cases but in most.

C = bpy.context
viewports_3D = []
for area in C.screen.areas:
    if area.type == 'VIEW_3D':
        viewports_3D.append(area)

attributes=['view_matrix', 'view_distance', 'view_perspective', 
            'use_box_clip', 'use_clip_planes', 'is_perspective',
            'show_sync_view', 'clip_planes']
ref_viewport = viewports_3D[0].spaces.active.region_3d

for viewport_3D in viewports_3D:
    for attribute in attributes:
        setattr(viewport_3D.spaces.active.region_3d, attribute, getattr(ref_viewport, attribute))