{"id":75678,"date":"2020-01-23T10:53:55","date_gmt":"2020-01-23T05:23:55","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=75678"},"modified":"2020-01-23T10:53:55","modified_gmt":"2020-01-23T05:23:55","slug":"r-matrix-functions","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/","title":{"rendered":"Matrix Functions in R &#8211; solve(), dim(), sum(), mean(), cbind()"},"content":{"rendered":"<p>In this article, we will learn what are matrix functions in R and different functions that operate on matrices. We will see their usage and look at a few examples.<\/p>\n<p><span data-preserver-spaces=\"true\">If you skipped the\u00a0<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/techvidvan.com\/tutorials\/r-matrix\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong><span data-preserver-spaces=\"true\">R matrix<\/span><\/strong><\/a><span data-preserver-spaces=\"true\"> tutorial, then revise R matrices before understanding its function.<\/span><\/p>\n<h3>What are R Matrices?<\/h3>\n<p>In R, matrices are <strong>two-dimensional<\/strong> data structures. They can store values of the same data type in the form of rows and columns. They have a <strong><code>dim<\/code><\/strong>attribute that defines their dimensions. We can create a matrix using the <strong><code>matrix()<\/code><\/strong> function.<\/p>\n<h2>What are the Matrix Functions in R?<\/h2>\n<p>Functions that take a matrix as input or return a matrix as output are called <strong>matrix functions<\/strong>. There are a lot of matrix functions in R. The major one that we are going to discuss today are:<\/p>\n<ol>\n<li>is.matrix() function<\/li>\n<li>%*% operator<\/li>\n<li>solve() function<\/li>\n<li>t() function<\/li>\n<li>dim() and dimnames() functions<\/li>\n<li>cbind() and rbind() functions<\/li>\n<li>diag() function<\/li>\n<li>det() function<\/li>\n<li>colSums(), rowSums(), and sum() functions<\/li>\n<li>colMeans(), rowMeans(), and mean() functions<\/li>\n<\/ol>\n<h3>1. is.matrix() Function<\/h3>\n<p>The <strong><code>is.matrix()<\/code><\/strong> function takes an object as input and returns <strong><code>TRUE<\/code><\/strong> if the object is a matrix. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">mat1 &lt;- matrix(c(1:9),c(3,3))\nis.matrix(mat1)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-is.matrix.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75716\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-is.matrix.png\" alt=\"is.matrix() - matrix function in r\" width=\"1299\" height=\"741\" \/><\/a><\/strong><\/p>\n<h3>2. %*% Operator<\/h3>\n<p>We can perform the element-wise multiplication of two matrices using the <strong><code>*<\/code><\/strong> operator. But we can do matrix multiplication, with the <strong><code>%*%<\/code><\/strong> operator. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">mat2 &lt;- matrix(c(3,2,0,0,0,1,2,-2,1),c(3,3))\nmat1*mat2<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">mat1%*%mat2<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-operator.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75746\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-operator.png\" alt=\"%*% operator - matrix functions in r\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h3>3. solve() Function<\/h3>\n<p>The <strong><code>solve()<\/code><\/strong> function takes a matrix as input and returns the matrix\u2019s inverse as output. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">mat2I &lt;- solve(mat2)\nmat2I<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-solve.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75718\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-solve.png\" alt=\"solve() - matrix functions in r\" width=\"1299\" height=\"741\" \/><\/a><\/strong><\/p>\n<h3>4. t() Function<\/h3>\n<p>The <strong><code>t()<\/code><\/strong> function in <a href=\"https:\/\/www.r-project.org\/\">R<\/a> gives us the transpose of a matrix. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">tmat1 &lt;- t(mat1)\ntmat1<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-t.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75719\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-t.png\" alt=\"t() - matrix functions in r\" width=\"1299\" height=\"741\" \/><\/a><\/strong><\/p>\n<h3>5. dim() and dimnames() Functions<\/h3>\n<p>The <strong><code>dim()<\/code><\/strong> function shows the dimension of a matrix. It can also change the dimension of a matrix and also convert a <a href=\"https:\/\/techvidvan.com\/tutorials\/r-vector\/\"><strong>vector<\/strong><\/a> into a matrix by giving it dimensions.<\/p>\n<p>The <strong><code>dimnames()<\/code><\/strong> function shows the names of the rows and columns of a matrix. It can also set or change the names of the rows and columns of a matrix. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">dim(mat1)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">dim(mat1) &lt;- c(9,1)\nmat1<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-dim.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75720\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-dim.png\" alt=\"dim() - matrix functions in r\" width=\"1299\" height=\"741\" \/><\/a><\/strong><\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">dimnames(mat2)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rnames &lt;- c(\"row1\",\"row2\",\"row3\")\ncnames &lt;- c(\"col1\",\"col2\",\"col3\")\ndimnames(mat2) &lt;- list(rnames,cnames)\nmat2<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-dimnames.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75721\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-dimnames.png\" alt=\"dimnames() - matrix functions in r\" width=\"1299\" height=\"741\" \/><\/a><\/strong><\/p>\n<h3>6. cbind() and rbind() Functions<\/h3>\n<p>The <strong><code>cbind()<\/code><\/strong> function joins two or more matrices or vectors <strong>column-wise<\/strong>. The <strong><code>rbind()<\/code><\/strong> function joins them <strong>row-wise<\/strong>. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">mat3 &lt;- matrix(c(1:12),c(3,4))\nmat4 &lt;- matrix(c(11:22),c(3,4))\ncbind(mat3,mat4)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rbind(mat3,mat4)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-cbind-and-rbind.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75722\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-cbind-and-rbind.png\" alt=\"cbind() and rbind() - matrix functions in r\" width=\"1299\" height=\"741\" \/><\/a><\/strong><\/p>\n<h3>7. diag() Function<\/h3>\n<p>The <strong><code>diag()<\/code><\/strong> function can extract or replace the diagonal of a matrix and can also construct a diagonal matrix. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">diag(mat3)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">diag(diag(mat3))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-diag.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75723\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-diag.png\" alt=\"diag() - matrix functions in r\" width=\"1299\" height=\"740\" \/><\/a><\/strong><\/p>\n<h3>8. det() Function<\/h3>\n<p>The <strong><code>det()<\/code><\/strong> function returns the determinant of the input matrix. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">det(mat2)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-det.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75724\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-det.png\" alt=\"det() - matrix functions in r\" width=\"1299\" height=\"742\" \/><\/a><\/strong><\/p>\n<h3>9. colSums(), rowSums(), and sum() Functions<\/h3>\n<p>The <strong><code>colSums()<\/code><\/strong> function returns the sums of <strong>each column<\/strong> of the matrix. The <strong><code>rowSums()<\/code><\/strong> function returns the sum of <strong>each row<\/strong> of a matrix. The <strong><code>sum()<\/code><\/strong> function returns the sum of all the elements of the matrix. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">colSums(mat3)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rowSums(mat3)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sum(mat3)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-colsums-rowsums-and-sum.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75725\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-colsums-rowsums-and-sum.png\" alt=\"colsums(), rowsums() and sum() - matrix function in r\" width=\"1299\" height=\"742\" \/><\/a><\/strong><\/p>\n<h3>10. colMeans(), rowMeans(), and mean() Function<\/h3>\n<p>The <strong><code>colMeans()<\/code><\/strong> function shows the means of each column of a matrix. The <strong><code>rowMeans()<\/code><\/strong> function shows the means of each row of the matrix. The <strong><code>mean()<\/code><\/strong> function returns the mean of all the elements of the matrix. For example:<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">colMeans(mat3)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rowMeans(mat3)<\/pre>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">mean(mat3)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-colmeansrowmeans-and-mean.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75729\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/matrix-functions-in-r-colmeansrowmeans-and-mean.png\" alt=\"colmeans(),rowmeans() and mean() - matrix functions in r\" width=\"1299\" height=\"741\" \/><\/a><\/strong><\/p>\n<h2>Summary<\/h2>\n<p>Matrices are two-dimensional, homogeneous data-structures in R. They have rows and columns and they can store data of only a single type.<\/p>\n<p>In this tutorial, we learned about matrices and matrix functions in R. We looked at a few common matrix functions. We also looked at their usage and their examples.<\/p>\n<p>R has a lot of <a href=\"https:\/\/techvidvan.com\/tutorials\/r-functions\/\"><strong>useful functions<\/strong><\/a> to perform complex calculations on matrices. With practice, you should be able to discover some more weird quirks and behaviors of these functions.<\/p>\n<p><strong>Any queries while executing these R matrix functions?<\/strong><\/p>\n<p><span data-preserver-spaces=\"true\">Don&#8217;t worry! Ask below, and our <\/span><strong><span data-preserver-spaces=\"true\">TechVidvan<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0experts will be happy to help you.<img decoding=\"async\" class=\"emoji\" role=\"img\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/svg\/1f642.svg\" alt=\"?\" \/><\/span><\/p>\n<p>Keep Executing!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will learn what are matrix functions in R and different functions that operate on matrices. We will see their usage and look at a few examples. If you skipped the\u00a0R&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":75740,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1020],"tags":[1270,1411,1412,1413,1253,1414,1415,1416],"class_list":["post-75678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","tag-matrix-function-in-r","tag-matrix-functions-in-r","tag-r-cbind","tag-r-dim","tag-r-matrix","tag-r-mean","tag-r-solve","tag-r-sum"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Matrix Functions in R - solve(), dim(), sum(), mean(), cbind() - TechVidvan<\/title>\n<meta name=\"description\" content=\"How to execute solve(), dim(), sum(), mean() matrix functions in R? In this tutorial, learn different functions that operate on R matrix with their usage.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Matrix Functions in R - solve(), dim(), sum(), mean(), cbind() - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"How to execute solve(), dim(), sum(), mean() matrix functions in R? In this tutorial, learn different functions that operate on R matrix with their usage.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-23T05:23:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/matrix-functions-in-R.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Matrix Functions in R - solve(), dim(), sum(), mean(), cbind() - TechVidvan","description":"How to execute solve(), dim(), sum(), mean() matrix functions in R? In this tutorial, learn different functions that operate on R matrix with their usage.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/","og_locale":"en_US","og_type":"article","og_title":"Matrix Functions in R - solve(), dim(), sum(), mean(), cbind() - TechVidvan","og_description":"How to execute solve(), dim(), sum(), mean() matrix functions in R? In this tutorial, learn different functions that operate on R matrix with their usage.","og_url":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-01-23T05:23:55+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/matrix-functions-in-R.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Matrix Functions in R &#8211; solve(), dim(), sum(), mean(), cbind()","datePublished":"2020-01-23T05:23:55+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/"},"wordCount":590,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/matrix-functions-in-R.jpg","keywords":["Matrix Function in R","Matrix Functions in R","R cbind()","R dim()","R matrix","R mean()","R solve()","R sum()"],"articleSection":["R Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/","url":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/","name":"Matrix Functions in R - solve(), dim(), sum(), mean(), cbind() - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/matrix-functions-in-R.jpg","datePublished":"2020-01-23T05:23:55+00:00","description":"How to execute solve(), dim(), sum(), mean() matrix functions in R? In this tutorial, learn different functions that operate on R matrix with their usage.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/matrix-functions-in-R.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/matrix-functions-in-R.jpg","width":802,"height":420,"caption":"matrix functions in R"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/r-matrix-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Matrix Functions in R &#8211; solve(), dim(), sum(), mean(), cbind()"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/75678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=75678"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/75678\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/75740"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=75678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=75678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=75678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}