LexiconShiftInnovations/SinhalaWikipediaArticles huggingface dataset:
ors of the matrix, which is the same as the maximum number of linearly independent column vectors.[10] Equivalently it is the dimension of the image of the linear map represented by A.[11] The rank-nullity theorem states that the dimension of the kernel of a matrix plus the rank equals the number of columns of the matrix.[12]සමචතුරස්‍රාකාර න්‍යාසA square matrix is a matrix with the same number of rows and columns. An n-by-n matrix is known as a square matrix of order n. Any two square matrices of the same order can be added and multiplied. A square matrix A is called invertible or non-singular if there exists a matrix B such thatAB = In.[13]This is equivalent to BA = In.[14] Moreover, if B exists, it is unique and is called the inverse matrix of A, denoted A−1.The entries Ai,i form the main diagonal of a matrix. The trace, tr(A) of a square matrix A is the sum of its diagonal entries. While, as mentioned above, matrix multiplication is not commutative, the trace of the
product of two matrices is independent of the order of the factors: tr(AB) = tr(BA).[15]Also, the trace of a matrix is equal to that of its transpose, i.e., tr(A) = tr(AT).If all entries outside the main diagonal are zero, A is called a diagonal matrix. If only all entries above (below) the main diagonal are zero, A is called a lower triangular matrix (upper triangular matrix, respectively). For example, if n = 3, they look like[d11000d22000d33]{\displaystyle {\begin{bmatrix}d_{11}&0&0\\0&d_{22}&0\\0&0&d_{33}\\\end{bmatrix}}} (diagonal), [l1100l21l220l31l32l33]{\displaystyle {\begin{bmatrix}l_{11}&0&0\\l_{21}&l_{22}&0\\l_{31}&l_{32}&l_{33}\\\end{bmatrix}}} (lower) and [u11u12u130u22u2300u33]{\displaystyle {\begin{bmatrix}u_{11}&u_{12}&u_{13}\\0&u_{22}&u_{23}\\0&0&
u_{33}\\\end{bmatrix}}}  (upper triangular matrix).නිර්ණායකයප්‍රධාන ලිපිය: DeterminantA linear transformation on R2 given by the indicated matrix. The determinant of this matrix is −1, as the area of the green parallelogram at the right is 1, but the map reverses the orientation, since it turns the counterclockwise orientation of the vectors to a clockwise one.The determinant det(A) or |A| of a square matrix A is a number encoding certain properties of the matrix. A matrix is invertible if and only if its determinant is nonzero. Its absolute value equals the area (in R2) or volume (in R3) of the image of the unit square (or cube), while its sign corresponds to the orientation of the corresponding linear map: the determinant is positive if and only if the orientation is preserved. The determinant of 2-by-2 matrices is given bydet(abcd)=ad−bc.{\displaystyle \det {\begin{pmatrix}a&b\\c&d\end{pmatrix}}=ad-bc.}When the determinant
is equal to one, then the matrix represents an equi-areal mapping. The determinant of 3-by-3 matrices involves 6 terms (rule of Sarrus). The more lengthy Leibniz formula generalises these two formulae to all dimensions.[16]The determinant of a product of square matrices equals the product of their determinants: det(AB) = det(A) · det(B).[17] Adding a multiple of any row to another row, or a multiple of any column to another column, does not change the determinant. Interchanging two rows or two columns affects the determinant by multiplying it by −1.[18] Using these operations, any matrix can be transformed to a lower (or upper) triangular matrix, and for such matrices the determinant equals the product of the entries on the main diagonal; this provides a method to calculate the determinant of any matrix. Finally, the Laplace expansion expresses the determinant in terms of minors, i.e., determinants of smaller matrices.[19] This expansion can be used for a recursive definition of dete
rminants (taking as starting case the determinant of a 1-by-1 matrix, which is its unique entry, or even the determinant of a 0-by-0 matrix, which is 1), that can be seen to be equivalent to the Leibniz formula. Determinants can be used to solve linear systems using Cramer's rule, where the division of the determinants of two related square matrices equates to the value of each of the system's variables.[20]අයිගන් අගයන් සහ අයිගන් දෛශිකප්‍රධාන ලිපිය: Eigenvalues and eigenvectorsA number λ and a non-zero vector v satisfyingAv = λvare called an eigenvalue and an eigenvector of A, respectively.[nb 1][21] The number λ is an eigenvalue of an n×n-matrix A if and only if A−λIn is not invertible, which is equivalent todet(A−λI)=0. {\displaystyle \det({\mathsf {A}}-\lambda {\mathsf {I}})=0.\ }[22]The function pA(t) = det(A−tI) is called the characteristic polynomial of A, its degree is n. Therefore pA(t) has at most n different roots, i.e., eigenvalu
es of the matrix.[23] They may be complex even if the entries of A are real. According to the Cayley–Hamilton theorem, pA(A) = 0, that is to say, the characteristic polynomial applied to the matrix itself yields the zero matrix.සමමිතියA square matrix A that is equal to its transpose, i.e., A = AT, is a symmetric matrix.  If instead, A was equal to the negative of its transpose, i.e., A = −AT, then A is a skew-symmetric matrix. In complex matrices, symmetry is often replaced by the concept of Hermitian matrices, which satisfy A∗ = A, where the star or asterisk denotes the conjugate transpose of the matrix, i.e., the transpose of the complex conjugate of A.By the spectral theorem, real symmetric matrices and complex Hermitian matrices have an eigenbasis; i.e., every vector is expressible as a linear combination of eigenvectors. In both cases, all eigenvalues are real.[24] This theorem can be generalized to infinite-dimensional situations related to matrices with infinite
ly many rows and columns, see below.නිශ්චිත භාවයMatrix A; definiteness; associated quadratic form QA(x,y);  set of vectors (x,y) such that QA(x,y)=1[1/4001/4]{\displaystyle {\begin{bmatrix}1/4&0\\0&1/4\end{bmatrix}}}[1/400−1/4]{\displaystyle {\begin{bmatrix}1/4&0\\0&-1/4\end{bmatrix}}}positive definiteindefinite1/4 x2 + 1/4y21/4 x2 − 1/4 y2 EllipseHyperbolaA symmetric n×n-matrix is called positive-definite (respectively negative-definite; indefinite), if for all nonzero vectors x ∈ Rn the associated quadratic form given byQ(x) = xTAxtakes only positive values (respectively only negative values; both some negative and some positive values).[25] If the quadratic form takes only non-negative (respectively only non-positive) values, the symmetric matrix is called positive-semidefinite (respectively negative-semidefinite); hence the matrix is indefinite precisely when it is n
either positive-semidefinite nor negative-semidefinite.A symmetric matrix is positive-definite if and only if all its eigenvalues are positive.[26] The table at the right shows two possibilities for 2-by-2 matrices.Allowing as input two different vectors instead yields the bilinear form associated to A:BA (x, y) = xTAy.[27]සංඛ්‍යාත්මක ආකාරIn addition to theoretical knowledge of properties of matrices and their relation to other fields, it is important for practical purposes to perform matrix calculations effectively and precisely. The domain studying these matters is called numerical linear algebra.[28] As with other numerical situations, two main aspects are the complexity of algorithms and their numerical stability. Many problems can be solved by both direct algorithms or iterative approaches. For example, finding eigenvectors can be done by finding a sequence of vectors xn converging to an eigenvector when n tends to infinity.[29]Determining the complexity of an alg
orithm means finding upper bounds or estimates of how many elementary operations such as additions and multiplications of scalars are necessary to perform some algorithm, e.g., multiplication of matrices. For example, calculating the matrix product of two n-by-n matrix using the definition given above needs n3 multiplications, since for any of the n2 entries of the product, n multiplications are necessary. The Strassen algorithm outperforms this "naive" algorithm; it needs only n2.807 multiplications.[30] A refined approach also incorporates specific features of the computing devices.In many practical situations additional information about the matrices involved is known. An important case are sparse matrices, i.e., matrices most of whose entries are zero. There are specifically adapted algorithms for, say, solving linear systems Ax = b for sparse matrices A, such as the conjugate gradient method.[31]An algorithm is, roughly speaking, numerically stable, if little deviations (such as
rounding errors) do not lead to big deviations in the result. For example, calculating the inverse of a matrix via Laplace's formula (Adj (A) denotes the adjugate matrix of A)A−1 = Adj(A) / det(A)may lead to significant rounding errors if the determinant of the matrix is very small. The norm of a matrix can be used to capture the conditioning of linear algebraic problems, such as computing a matrix' inverse.[32]Although most computer languages are not designed with commands or libraries for matrices, as early as the 1970s, some engineering desktop computers such as the HP 9830 had ROM cartridges to add BASIC commands for matrices. Some computer languages such as APL were designed to manipulate matrices, and various mathematical programs can be used to aid computing with matrices.[33]න්‍යාස වියෝජන ක්‍රමප්‍රධාන ලිපියන්: Matrix decomposition, Matrix diagonalization, Gaussian elimination,  සහ Montante's methodThere are several methods to render matrices into a more easil
y accessible form. They are generally referred to as matrix transformation or matrix decomposition techniques. The interest of all these decomposition techniques is that they preserve certain properties of the matrices in question, such as determinant, rank or inverse, so that these quantities can be calculated after applying the transformation, or that certain matrix operations are algorithmically easier to carry out for some types of matrices.The LU decomposition factors matrices as a product of lower (L) and an upper triangular matrices (U).[34] Once this decomposition is calculated, linear systems can be solved more efficiently, by a simple technique called forward and back substitution. Likewise, inverses of triangular matrices are algorithmically easier to calculate. The Gaussian elimination is a similar algorithm; it transforms any matrix to row echelon form.[35] Both methods proceed by multiplying the matrix by suitable elementary matrices, which correspond to permuting rows o
r columns and adding multiples of one row to another row. Singular value decomposition expresses any matrix A as a product UDV∗, where U and V are unitary matrices and D is a diagonal matrix.A matrix in Jordan normal form. The grey blocks are called Jordan blocks.The eigendecomposition or diagonalization expresses A as a product VDV−1, where D is a diagonal matrix and V is a suitable invertible matrix.[36]  If A can be written in this form, it is called diagonalizable. More generally, and applicable to all matrices, the Jordan decomposition transforms a matrix into Jordan normal form, that is to say matrices whose only nonzero entries are the eigenvalues λ1 to λn of A, placed on the main diagonal and possibly entries equal to one directly above the main diagonal, as shown at the right.[37]  Given the eigendecomposition, the nth power of A (i.e., n-fold iterated matrix multiplication) can be calculated viaAn = (VDV−1)n = VDV−1VDV−1...VDV−1 = VDnV−1and the power of a diagonal matri
x can be calculated by taking the corresponding powers of the diagonal entries, which is much easier than doing the exponentiation for A instead. This can be used to compute the matrix exponential eA, a need frequently arising in solving linear differential equations, matrix logarithms and square roots of matrices.[38] To avoid numerically ill-conditioned situations, further algorithms such as the Schur decomposition can be employed.[39]වීජීය සංක්ෂේපන ආකාරය සහ සාධාරණීකරණයMatrices can be generalized in different ways. Abstract algebra uses matrices with entries in more general fields or even rings, while linear algebra codifies properties of matrices in the notion of linear maps. It is possible to consider matrices with infinitely many columns and rows. Another extension are tensors, which can be seen as higher-dimensional arrays of numbers, as opposed to vectors, which can often be realised as sequences of numbers, while matrices are rectangular or two-dimensional array of
numbers.[40] Matrices, subject to certain requirements tend to form groups known as matrix groups.න්‍යාස සමඟ බොහෝ සාමාන්‍ය ඇතුලත් කිරීම්This article focuses on matrices whose entries are real or complex numbers. However, matrices can be considered with much more general types of entries than real or complex numbers. As a first step of generalization, any field, i.e., a set where addition, subtraction, multiplication and division operations are defined and well-behaved, may be used instead of R or C, for example rational numbers or finite fields. For example, coding theory makes use of matrices over finite fields. Wherever eigenvalues are considered, as these are roots of a polynomial they may exist only in a larger field than that of the coefficients of the matrix; for instance they may be complex in case of a matrix with real entries. The possibility to reinterpret the entries of a matrix as elements of a larger field (e.g., to view a real matrix as a complex matrix whos
e entries happen to be all real) then allows considering each square matrix to possess a full set of eigenvalues. Alternatively one can consider only matrices with entries in an algebraically closed field, such as C, from the outset.More generally, abstract algebra makes great use of matrices with entries in a ring R.[41] Rings are a more general notion than fields in that no division operation exists. The very same addition and multiplication operations of matrices extend to this setting, too. The set M(n, R) of all square n-by-n matrices over R is a ring called matrix ring, isomorphic to the endomorphism ring of the left R-module Rn.[42] If the ring R is commutative, i.e., its multiplication is commutative, then M(n, R) is a unitary noncommutative (unless n = 1) associative algebra over R. The determinant of square matrices over a commutative ring R can still be defined using the Leibniz formula; such a matrix is invertible if and only if its determinant is invertible in R, generali
sing the situation over a field F, where every nonzero element is invertible.[43] Matrices over superrings are called supermatrices.[44]Matrices do not always have all their entries in the same ring – or even in any ring at all. One special but common case is block matrices, which may be considered as matrices whose entries themselves are matrices. The entries need not be quadratic matrices, and thus need not be members of any ordinary ring; but their sizes must fulfil certain compatibility conditions.රේඛීය සිතියම් වලට ඇති සබැඳියාවLinear maps Rn → Rm are equivalent to m-by-n matrices, as described above. More generally, any linear map f: V → W between finite-dimensional vector spaces can be described by a matrix A = (aij), after choosing bases v1, ..., vn of V, and w1, ..., wm of W (so n is the dimension of V and m is the dimension of W), which is such thatf(vj)=∑i=1mai,jwifor j=1,…,n.{\displaystyle f(\mathbf {v
} _{j})=\sum _{i=1}^{m}a_{i,j}\mathbf {w} _{i}\qquad {\mbox{for }}j=1,\ldots ,n.}In other words, column j of A expresses the image of vj in terms of the basis vectors wi of W; thus this relation uniquely determines the entries of the matrix A. Note that the matrix depends on the choice of the bases: different choices of bases give rise to different, but equivalent matrices.[45] Many of the above concrete notions can be reinterpreted in this light, for example, the transpose matrix AT describes the transpose of the linear map given by A, with respect to the dual bases.[46]More generally, the set of m×n matrices can be used to represent the R-linear maps between the free modules Rm and Rn for an arbitrary ring R with unity.  When n = m composition of these maps is possible, and this gives rise to the matrix ring of n×n matrices representing the endomorphism ring of Rn.න්‍යාස කාණ්ඩප්‍රධාන ලිපිය: Matrix groupA group is a mathematical structure consisting of a set of objec
ts together with a binary operation, i.e., an operation combining any two objects to a third, subject to certain requirements.[47] A group in which the objects are matrices and the group operation is matrix multiplication is called a matrix group.[nb 2][48] Since in a group every element has to be invertible, the most general matrix groups are the groups of all invertible matrices of a given size, called the general linear groups.Any property of matrices that is preserved under matrix products and inverses can be used to define further matrix groups. For example, matrices with a given size and with a determinant of 1 form a subgroup of (i.e., a smaller group contained in) their general linear group, called a special linear group.[49] Orthogonal matrices, determined by the conditionMTM = I,form the orthogonal group.[50]  They are called orthogonal since the associated linear transformations of Rn preserve angles in the sense that the scalar product of two vectors is unchanged after
applying M to them:(Mv) · (Mw) = v · w.[51]Every finite group is isomorphic to a matrix group, as one can see by considering the regular representation of the symmetric group.[52] General groups can be studied using matrix groups, which are comparatively well-understood, by means of representation theory.[53]අපරිමිත න්‍යාසIt is also possible to consider matrices with infinitely many rows and/or columns[54] even if, being infinite objects, one cannot write down such matrices explicitly. All that matters is that for every element in the set indexing rows, and every element in the set indexing columns, there is a well-defined entry (these index sets need not even be subsets of the natural numbers). The basic operations of addition, subtraction, scalar multiplication and transposition can still be defined without problem; however matrix multiplication may involve infinite summations to define the resulting entries, and these are not defined in general.If R is any ring with
unity, then the ring of endomorphisms of M=⨁i∈IR{\displaystyle M=\bigoplus _{i\in I}R} as a right R module is isomorphic to the ring of column finite matrices CFMI(R){\displaystyle \mathbb {CFM} _{I}(R)} whose entries are indexed by I×I{\displaystyle I\times I}, and whose columns each contain only finitely many nonzero entries.  The endomorphisms of M considered as a left R module result in an analogous object, the row finite matrices RFMI(R){\displaystyle \mathbb {RFM} _{I}(R)} whose rows each only have finitely many nonzero entries.If infinite matrices are used to describe linear maps, then only those matrices can be used all of whose columns have but a finite number of nonzero entries, for the following reason. For a matrix A to describe a linear map f: V→W, bases for both spaces must have been chosen; recall that by definition this means that every vector in the space can be written uniquely as a (finite) lin
ear combination of basis vectors, so that written as a (column) vector v of coefficients, only finitely many entries vi are nonzero. Now the columns of A describe the images by f of individual basis vectors of V in the basis of W, which is only meaningful if these columns have only finitely many nonzero entries. There is no restriction on the rows of A however: in the product A·v there are only finitely many nonzero coefficients of v involved, so every one of its entries, even if it is given as an infinite sum of products, involves only finitely many nonzero terms and is therefore well defined. Moreover this amounts to forming a linear combination of the columns of A that effectively involves only finitely many of them, whence the result has only finitely many nonzero entries, because each of those columns do. One also sees that products of two matrices of the given type is well defined (provided as usual that the column-index and row-index sets match), is again of the same type, and c
orresponds to the composition of linear maps.If R is a normed ring, then the condition of row or column finiteness can be relaxed.  With the norm in place, absolutely convergent series can be used instead of finite sums.  For example, the matrices whose column sums are absolutely convergent sequences form a ring.  Analogously of course, the matrices whose row sums are absolutely convergent series also form a ring.  In that vein, infinite matrices can also be used to describe operators on Hilbert spaces, where convergence and continuity questions arise, which again results in certain constraints that have to be imposed. However, the explicit point of view of matrices tends to obfuscate the matter,[nb 3] and the abstract and more powerful tools of functional analysis can be used instead.ශූන්‍ය න්‍යාසAn empty matrix is a matrix in which the number of rows or columns (or both) is zero.[55][56] Empty matrices help dealing with maps involving the zero vector space. For example
, if A is a 3-by-0 matrix A and B is a 0-by-3 matrix, then AB is the 3-by-3 zero matrix corresponding to the null map from a 3-dimensional space V to itself, while BA is a 0-by-0 matrix. There is no common notation for empty matrices, but most computer algebra systems allow creating and computing with them. The determinant of the 0-by-0 matrix is 1 as follows from regarding the empty product occurring in the Leibniz formula for the determinant as 1. This value is also consistent with the fact that the identity map from any finite dimensional space to itself has determinant 1, a fact that is often used as a part of the characterization of determinants.භාවිතයThere are numerous applications of matrices, both in mathematics and other sciences. Some of them merely take advantage of the compact representation of a set of numbers in a matrix. For example, in game theory and economics, the payoff matrix encodes the payoff for two players, depending on which out of a given (finite)
set of alternatives the players choose.[57] Text mining and automated thesaurus compilation makes use of document-term matrices such as tf-idf to track frequencies of certain words in several documents.[58]Complex numbers can be represented by particular real 2-by-2 matrices viaa+ib↔[a−bba],{\displaystyle a+ib\leftrightarrow {\begin{bmatrix}a&-b\\b&a\end{bmatrix}},}under which addition and multiplication of complex numbers and matrices correspond to each other. For example, 2-by-2 rotation matrices represent the multiplication with some complex number of absolute value 1, as above. A similar interpretation is possible for quaternions.[59]Early encryption techniques such as the Hill cipher also used matrices. However, due to the linear nature of matrices, these codes are comparatively easy to break.[60] Computer graphics uses matrices both to represent objects and to calculate transformations of objects using affine rotation matrices to accom
plish tasks such as projecting a three-dimensional object onto a two-dimensional screen, corresponding to a theoretical camera observation.[61] Matrices over a polynomial ring are important in the study of control theory.Chemistry makes use of matrices in various ways, particularly since the use of quantum theory to discuss molecular bonding and spectroscopy. Examples are the overlap matrix and the Fock matrix used in solving the Roothaan equations to obtain the molecular orbitals of the Hartree–Fock method.ප්‍රස්තාරික සිද්ධාන්තයAn undirected graph with adjacency matrix [210101010].{\displaystyle {\begin{bmatrix}2&1&0\\1&0&1\\0&1&0\end{bmatrix}}.}The adjacency matrix of a finite graph is a basic notion of graph theory.[62] It saves which vertices of the graph are connected by an edge. Matrices containing just two different values (0 and 1 meaning for example "yes" and "no") are called logical matrices. The distance (or co