A summary of data about the Ruby ecosystem.

https://github.com/ruby/matrix

An implementation of Matrix and Vector classes
https://github.com/ruby/matrix

Keywords

hacktoberfest ruby

Keywords from Contributors

repl bigdecimal webrick rubygems debugger debugging-tool documentation-tool strscan lalr-parser-generator parser-generator

Last synced: about 19 hours ago
JSON representation

Repository metadata

An implementation of Matrix and Vector classes

README.md

Matrix Version Bundled Gem Test

An implementation of Matrix and Vector classes.

The Matrix class represents a mathematical matrix. It provides methods for creating matrices, operating on them arithmetically and algebraically, and determining their mathematical properties (trace, rank, inverse, determinant, eigensystem, etc.).

The Vector class represents a mathematical vector, which is useful in its own right, and also constitutes a row or column of a Matrix.

Installation

The matrix library comes pre-installed with Ruby. Unless you need recent features, you can simply require 'matrix' directly, no need to install it.

If you need features that are more recent than the version of Ruby you want to support (check the CHANGELOG), you must use the gem. To do this, add this line to your application's Gemfile or gem's gemspec:

gem 'matrix'

And then execute:

$ bundle

To make sure that the gem takes precedence over the builtin library, call bundle exec ... (or call gem 'matrix' explicitly).

Usage

require 'matrix'
m = Matrix[[1, 2], [3, 4]]
m.determinant # => -2

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/matrix.

License

The gem is available as open source under the terms of the 2-Clause BSD License.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 253
Total Committers: 34
Avg Commits per committer: 7.441
Development Distribution Score (DDS): 0.573

Commits in past year: 16
Committers in past year: 4
Avg Commits per committer in past year: 4.0
Development Distribution Score (DDS) in past year: 0.375

Name Email Commits
marcandre m****e@b****e 108
Hiroshi SHIBATA h****t@r****g 44
matz m****z@b****e 22
nobu n****u@b****e 12
dependabot[bot] 4****] 11
keiju k****u@b****e 9
kazu k****u@b****e 4
yugui y****i@b****e 4
Akira Matsuda r****e@d****p 3
mame m****e@b****e 3
naruse n****e@b****e 3
Marcus Stollsteimer s****r@w****e 3
gsinclair g****r@b****e 2
dave d****e@b****e 2
Felix Wolfsteller f****r@g****m 2
Jan Lelis m****l@j****e 2
akr a****r@b****e 2
zverok z****e@g****m 1
wanabe w****e@b****e 1
usa u****a@b****e 1
universato u****o@g****m 1
zzak z****k@b****e 1
svn s****n@b****e 1
shyouhei s****i@b****e 1
shugo s****o@b****e 1
kojix2 2****k@g****m 1
drbrain d****n@b****e 1
ayumin a****n@b****e 1
Takashi Kokubun t****n@g****m 1
Koichi Sasada k****1@a****t 1
and 4 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 8 days ago

Total issues: 7
Total pull requests: 42
Average time to close issues: 17 days
Average time to close pull requests: 6 days
Total issue authors: 5
Total pull request authors: 16
Average comments per issue: 3.29
Average comments per pull request: 0.62
Merged pull request: 32
Bot issues: 0
Bot pull requests: 13

Past year issues: 0
Past year pull requests: 14
Past year average time to close issues: N/A
Past year average time to close pull requests: about 5 hours
Past year issue authors: 0
Past year pull request authors: 3
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 10
Past year bot issues: 0
Past year bot pull requests: 12

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ruby/matrix

Top Issue Authors

  • fwolfst (3)
  • turonn (1)
  • headius (1)
  • coffeejunk (1)
  • mcartron (1)

Top Pull Request Authors

  • dependabot[bot] (13)
  • hsbt (6)
  • marcandre (4)
  • janlelis (3)
  • stomar (3)
  • fwolfst (2)
  • olleolleolle (2)
  • AlessandroMinali (1)
  • k0kubun (1)
  • grzegorz-jakubiak (1)
  • der-scheme (1)
  • kojix2 (1)
  • zverok (1)
  • gmcgibbon (1)
  • universato (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (13)
  • github_actions (12)

Package metadata

gem.coop: matrix

An implementation of Matrix and Vector classes.

  • Homepage: https://github.com/ruby/matrix
  • Documentation: http://www.rubydoc.info/gems/matrix/
  • Licenses: Ruby,BSD-2-Clause
  • Latest release: 0.4.3 (published 9 months ago)
  • Last Synced: 2026-03-01T03:05:00.629Z (2 days ago)
  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 144,701,430 Total
  • Docker Downloads: 4,106,186,641
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.06%
    • Downloads: 0.181%
  • Maintainers (3)
rubygems.org: matrix

An implementation of Matrix and Vector classes.

  • Homepage: https://github.com/ruby/matrix
  • Documentation: http://www.rubydoc.info/gems/matrix/
  • Licenses: Ruby,BSD-2-Clause
  • Latest release: 0.4.3 (published 9 months ago)
  • Last Synced: 2026-02-26T19:00:49.008Z (5 days ago)
  • Versions: 8
  • Dependent Packages: 69
  • Dependent Repositories: 43,643
  • Downloads: 144,376,553 Total
  • Docker Downloads: 4,106,186,641
  • Rankings:
    • Docker downloads count: 0.016%
    • Dependent repos count: 0.161%
    • Downloads: 0.404%
    • Dependent packages count: 0.511%
    • Average: 2.193%
    • Forks count: 4.882%
    • Stargazers count: 7.182%
  • Maintainers (3)
proxy.golang.org: github.com/ruby/matrix

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/ruby/matrix#section-documentation
  • Licenses: other
  • Latest release: v0.4.3 (published 9 months ago)
  • Last Synced: 2026-02-26T19:01:01.936Z (5 days ago)
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 4.23%
    • Stargazers count: 5.54%
    • Average: 7.537%
    • Dependent packages count: 9.576%
    • Dependent repos count: 10.802%
alpine-v3.18: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r1 (published almost 3 years ago)
  • Last Synced: 2026-02-02T08:25:50.509Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 10.478%
    • Forks count: 19.63%
    • Stargazers count: 22.283%
  • Maintainers (1)
alpine-v3.18: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r1 (published almost 3 years ago)
  • Last Synced: 2026-02-06T07:15:53.490Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 10.478%
    • Forks count: 19.63%
    • Stargazers count: 22.283%
  • Maintainers (1)
alpine-edge: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r3 (published 10 months ago)
  • Last Synced: 2026-03-01T13:03:45.826Z (2 days ago)
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 14.641%
    • Average: 14.88%
    • Forks count: 20.515%
    • Stargazers count: 24.366%
  • Maintainers (1)
alpine-edge: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r3 (published 10 months ago)
  • Last Synced: 2026-02-05T05:03:45.633Z (26 days ago)
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 14.641%
    • Average: 14.88%
    • Forks count: 20.515%
    • Stargazers count: 24.366%
  • Maintainers (1)
alpine-v3.16: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r0 (published almost 4 years ago)
  • Last Synced: 2026-02-06T07:04:23.505Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 14.918%
    • Forks count: 15.067%
    • Stargazers count: 17.292%
    • Dependent packages count: 27.311%
  • Maintainers (1)
alpine-v3.16: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r0 (published almost 4 years ago)
  • Last Synced: 2026-03-01T14:13:34.114Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 14.918%
    • Forks count: 15.067%
    • Stargazers count: 17.292%
    • Dependent packages count: 27.311%
  • Maintainers (1)
alpine-v3.17: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r0 (published almost 4 years ago)
  • Last Synced: 2026-02-02T03:42:43.777Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 16.466%
    • Forks count: 17.896%
    • Stargazers count: 20.714%
    • Dependent packages count: 27.254%
  • Maintainers (1)
alpine-v3.17: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r0 (published almost 4 years ago)
  • Last Synced: 2026-02-03T11:12:52.363Z (28 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 16.466%
    • Forks count: 17.896%
    • Stargazers count: 20.714%
    • Dependent packages count: 27.254%
  • Maintainers (1)
alpine-v3.21: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r2 (published about 2 years ago)
  • Last Synced: 2026-02-02T03:42:40.341Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.19: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r1 (published almost 3 years ago)
  • Last Synced: 2026-02-03T13:25:25.682Z (28 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.22: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r3 (published 10 months ago)
  • Last Synced: 2026-02-06T18:27:59.804Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.23: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r3 (published 10 months ago)
  • Last Synced: 2026-02-03T10:00:36.595Z (28 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
alpine-v3.23: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r3 (published 10 months ago)
  • Last Synced: 2026-02-03T10:00:38.430Z (28 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
alpine-v3.22: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r3 (published 10 months ago)
  • Last Synced: 2026-02-02T03:43:07.111Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.21: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r2 (published about 2 years ago)
  • Last Synced: 2026-02-02T03:43:25.240Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.20: ruby-matrix-doc

An implementation of Matrix and Vector classes (ri docs)

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r2 (published about 2 years ago)
  • Last Synced: 2026-02-02T09:11:23.059Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.19: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r1 (published almost 3 years ago)
  • Last Synced: 2026-02-02T06:20:00.334Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.20: ruby-matrix

An implementation of Matrix and Vector classes

  • Homepage: https://github.com/ruby/matrix
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.2-r2 (published about 2 years ago)
  • Last Synced: 2026-02-02T03:43:21.118Z (29 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)

Dependencies

Gemfile rubygems
  • rake >= 0
  • test-unit >= 0
.github/workflows/test.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
matrix.gemspec rubygems
.github/workflows/push_gem.yml actions
  • actions/checkout 0ad4b8fadaa221de15dcec353f45205ec38ea70b composite
  • ruby/setup-ruby a6e6f86333f0a2523ece813039b8b4be04560854 composite
  • rubygems/release-gem a25424ba2ba8b387abc8ef40807c2c85b96cbe32 composite
  • step-security/harden-runner 6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 composite

Score: 30.80870973478981