is_unique: Check if the matrix equation Ax = b has a unique solution

View source: R/is_unique.R

is_uniqueR Documentation

Check if the matrix equation Ax = b has a unique solution

Description

Check if the matrix equation Ax = b has a unique solution

Usage

is_unique(A, b)

Arguments

A

The matrix A

b

The vector b

Value

This function returns TRUE if there is a unique solution to the equation Ax = b and FALSE if there is not a unique solution to the equation Ax = b. If there is no solution to the system of equations, the function will return an error.

Examples


library(dasc2594)
A <- diag(2)
b <- 1:2
# expect TRUE
is_consistent(A, b)
# expect TRUE
is_unique(A, b)

A <- matrix(c(1, 0, 0, 1, 1, 1), 2, 3)
b <- 1:2
# expect FALSE
is_unique(A, b)

jtipton25/dasc2594 documentation built on Oct. 7, 2022, 3:46 p.m.