# mat4.lookat matrix VS the view matrix?

**URL:** https://discourse.vtk.org/t/mat4-lookat-matrix-vs-the-view-matrix/10386
**Category:** Web
**Created:** [January 4, 2023, 7:08pm UTC](https://discourse.vtk.org/t/mat4-lookat-matrix-vs-the-view-matrix/10386 "2023-01-04T19:08:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Alireza](https://discourse.vtk.org/user_avatar/discourse.vtk.org/alireza/32/6230_2.png) [@Alireza](https://discourse.vtk.org/u/Alireza)
#### Post date: [January 4, 2023, 7:08pm UTC](https://discourse.vtk.org/t/mat4-lookat-matrix-vs-the-view-matrix/10386/1 "2023-01-04T19:08:58Z")

</div>

Based on couple of webGL resources (links below) the [mat4 lookat matrix](https://glmatrix.net/docs/module-mat4.html) is the actual matrix that converts the world coordinate into the view coordinates (so basically the view matrix). But in vtk.js source code I see that we do a final transpose (invert) to get the view matrix [here](https://github.com/Kitware/vtk-js/blob/4604c7309c92659609e5e4c25f012001ec7bb202/Sources/Rendering/Core/Camera/index.js#L487). Am I missing something? Is this row vs column major thing?

[Resources]

- [Tutorial 3 : Matrices](http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/#the-model-view-and-projection-matrices)
- [Breakdown of the LookAt function in OpenGL | Geert Arien](https://www.geertarien.com/blog/2017/07/30/breakdown-of-the-lookAt-function-in-OpenGL/)
